<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Postnidea</title>
	<atom:link href="https://www.postnidea.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.postnidea.com/</link>
	<description>Programming Blog, Tutorials, jQuery, Ajax, PHP, MySQL and Demos</description>
	<lastBuildDate>Tue, 27 May 2025 09:13:24 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.2.8</generator>

<image>
	<url>https://www.postnidea.com/wp-content/uploads/2019/08/favicon.ico</url>
	<title>Postnidea</title>
	<link>https://www.postnidea.com/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>A Refreshing Dive into JavaScript ES6 Concepts</title>
		<link>https://www.postnidea.com/a-refreshing-dive-into-javascript-es6-concepts/</link>
		
		<dc:creator><![CDATA[Rakesh Kumar]]></dc:creator>
		<pubDate>Wed, 06 Nov 2024 11:38:33 +0000</pubDate>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Jquery]]></category>
		<guid isPermaLink="false">https://www.postnidea.com/?p=269</guid>

					<description><![CDATA[<p>JavaScript ES6 concepts and principles are fundamental. Nowadays new modern javascript libraries and frameworks use these concepts. ES6 concepts, covering [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.postnidea.com/a-refreshing-dive-into-javascript-es6-concepts/">A Refreshing Dive into JavaScript ES6 Concepts</a> appeared first on <a rel="nofollow" href="https://www.postnidea.com">Postnidea</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>JavaScript ES6 concepts and principles are fundamental. Nowadays new modern javascript libraries and frameworks use these concepts. ES6 concepts, covering variables and data types, functions, arrays and objects, control flow and loops, error handling, scope and closures, and DOM manipulation. Each section provides an in-depth explanation with examples to help you understand these fundamental aspects of JavaScript. Nowadays React <a href="https://www.postnidea.com/angular-6-tutorial-for-routing-and-navigation/" target="_blank" rel="noreferrer noopener">Angular</a> and other javascript technologies are using these core practices. By mastering the fundamentals of JavaScript ES6, you&#8217;ll be equipped with the knowledge and skills to write clean, maintainable code and tackle more advanced JavaScript concepts with confidence. So, let&#8217;s dive in and unlock the power of JavaScript ES6 together!</p>



<h2 class="wp-block-heading">Difference between var, let &amp; const</h2>



<p>By using <code><mark style="background-color:var(--ast-global-color-6)" class="has-inline-color">var</mark></code> old way of defining variables. But javascript still maintains this type of syntax so, that old written code can also be executed and run by language because after an update each code updates a crucial thing.</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>var p_name = &quot;jhon&quot;;
console.log(p_name); // will print jhon
p_name = &quot;Rahul&quot;;
console.log(p_name); // will print Rahul
var p_name=&quot;Ramesh&quot;;
console.log(p_name);</code></pre></div>



<p>In the above code, you can see it different way of defining var. The var is globally scoped so, you can define its top, and can be modified anywhere wherever required let me explain by example.</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>var username = &quot;Jhon&quot;;
var age = 24;
if (age &gt; 23) {
    var usename = &quot;Mosh&quot;; 
}
console.log(usename) // Will print &quot;Mosh&quot;</code></pre></div>



<p>In the above example, you can see that we have defined a username and in the if statement block is modified and can be accessed outside the block and able to print it. But in the case of let and const this will not happen because both are block scoped so, will able to access within the block the same thing let me explain to you by example.</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>let username = &quot;Jhon&quot;;
let age = 24;
if (age &gt; 23) {
     let usename = &quot;Mosh&quot;; 
}
console.log(usename) // Will print usename is not defined</code></pre></div>



<p>If we print the username then will throw an error because we again define in if block and it is block-scoped and their scope ends there if we do not again initialize with let in if block then will not throw an error. You can initialize a single time and can modify the value anywhere.</p>



<p>The const works the same as the variable but the main difference is that their value can not be modified within the block or outside the block in this datatype you can add value a single time and will same throughout the execution.</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>const fullname = &quot;Rakesh Kumar&quot;;
console.log(fullname); // Will print Rakesh Kumar
fullname = &quot;Mahesh&quot;; // TypeError: Assignment to constant variable.</code></pre></div>



<h2 class="wp-block-heading">Arrow function in JavaScript ES6</h2>



<p>It&#8217;s the same as a normal function that we create we create as usual like below let&#8217;s take an example of the addition of two numbers this function will add two provided numbers and return it.</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>function add(n1, n2){
	return n1+n2;
}
console.log(add(5,2)); // Will print 7</code></pre></div>



<p>In JavaScript, an arrow function is a shortcut for writing functions. Compared to a conventional function expression, it is syntactically more compact and has several specific features, particularly with regard to this binding. This can be written by using => (&#8220;fat arrow&#8221;) syntax same function converts into an arrow function. There is also no difference in calling.</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>const add = (a, b) =&gt; {
  return  a + b;
};
console.log(add(5,2)); // Will print 7</code></pre></div>



<p>For more convenience, we can also remove &#8220;{}&#8221; from the function definition. But there is a different calling for single and multiple parameters let see the example for both and single and multiple parameters.</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>const add = (a, b) =&gt; a + b;
console.log(add(5,2)); // Will print 7

const doubler = x =&gt; 2 * x;
console.log(doubler(5)); // Will print 10

const say = () =&gt; &#39;Say Hello&#39;;
console.log(say()); // Will Say Hello</code></pre></div>



<p><strong>use case for arrow function:</strong><br>This implementation in short inline actions, like array operations (map, filter, reduce)</p>



<h4 class="wp-block-heading">Differences from Regular Functions:</h4>



<p><strong>Lexical </strong><mark style="background-color:var(--ast-global-color-6)" class="has-inline-color has-ast-global-color-7-color">this</mark><strong> Binding:</strong> Arrow functions don&#8217;t have a context of their own. Rather, they inherit this from the global scope or surrounding function. When you wish to maintain the surrounding scope&#8217;s value during callbacks, this is quite helpful.</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>function counter() {
  this.increment = 0;
  setInterval(() =&gt; {
    this.increment++; // &#39;this&#39; refers to the counter instance
  }, 1000);
}
let c = new counter();
console.log(c.age); // will print 0</code></pre></div>



<p>In the above example, you can see it will print 0 because of this reference to global scope. If we<br>console.log(this.increment)<br>within the setInterval curly braces inside then will print. So, it&#8217;s globally scoped and block context.</p>



<p><strong>Cannot be used as Constructors:</strong><br>The arrow function can not be used as a constructor you can see in the above example like<br>let c = new counter();<br>But if we can try with same thing with the arrow function will print the below error.<br>TypeError: counter is not a constructor</p>



<p><strong>Implicit return:</strong><br>When creating a single argument function then return the keyword not required by default omitted.<br>const doubler = x => 2 * x;<br>In this example, you can see I have not used the return keyword.</p>



<h4 class="wp-block-heading">Use Cases of arrow function in JavaScript ES6</h4>



<p>The best implementation of the arrow function you can see in map, filter, and reduce.</p>



<h2 class="wp-block-heading">Modules in JavaScript ES6</h2>



<p>JavaScript modules were established through the ES6 module syntax, providing a standardized approach for importing and exporting code across different files. This modularity enables programmers to organize their code more effectively and facilitates the sharing of functionality among various components of an application.</p>



<p>To explain the module let&#8217;s take an example that already stated that modular means we can write code in different files and use any place so let me create three files.<br><code><mark style="background-color:var(--ast-global-color-6)" class="has-inline-color">user.js // contain user information<br>address.js //will contain details related to address<br>main.js // it's the final file in which call both above file code</mark></code></p>



<h3 class="wp-block-heading">Exporting from a Module</h3>



<h4 class="wp-block-heading"><strong>Default Export</strong>:</h4>



<p>Now I have created first file <code><mark style="background-color:var(--ast-global-color-6)" class="has-inline-color">user.js</mark></code> in which you can see it I have saved the user information in variable user and at the end I have added the line<code><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-ast-global-color-6-color"> </mark><mark style="background-color:var(--ast-global-color-6)" class="has-inline-color">export default user</mark><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-ast-global-color-6-color">;</mark></code> this code provides the ability to use method, variable, etc in another file. In default export, we can export only the single class, method, and variable in another file by import.</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>// Filename : user.js 
//---------------------------
const user = {
    username:&quot;Jhon&quot;,
    email:&quot;john@gmail.com&quot;
}
export default user;</code></pre></div>



<h4 class="wp-block-heading"><strong>Named Exports</strong>:</h4>



<p>Now move to 2nd file <code><mark style="background-color:var(--ast-global-color-6)" class="has-inline-color">address.js</mark></code> in which handles user address-related information. Also will see the syntax for named export. To define named export we have to write export preceding to function, variable or class so that can be exported and used in another place. Help of named export we can export multiple function variables and classes.</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>// Filename : address.js 
//---------------------------
export let getCity = () =&gt;{
    return &quot;Noida&quot;;
}
export let addressId = 25;</code></pre></div>



<h3 class="wp-block-heading">Importing from a Module in JavaScript ES6</h3>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="579" src="https://www.postnidea.com/wp-content/uploads/2024/11/module-in-javascript-es6-1024x579.png" alt="Importing from a Module in JavaScript ES6" class="wp-image-282" srcset="https://www.postnidea.com/wp-content/uploads/2024/11/module-in-javascript-es6-1024x579.png 1024w, https://www.postnidea.com/wp-content/uploads/2024/11/module-in-javascript-es6-300x170.png 300w, https://www.postnidea.com/wp-content/uploads/2024/11/module-in-javascript-es6-768x434.png 768w, https://www.postnidea.com/wp-content/uploads/2024/11/module-in-javascript-es6.png 1302w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p><strong>Note:</strong><br>For importing modules in html file need to add a type module then the module feature will work and the file call should be from a sever like localhost or any server extensions that are available that can be used like Live server which is compatible with Visual Studio Code if you are using Visual Studio Code.<br><br>So, now we add the main file <code><mark style="background-color:var(--ast-global-color-6)" class="has-inline-color">main.js </mark></code>their code explains further. This file will add the main execution and will use the code that is written in the file <code><mark style="background-color:var(--ast-global-color-6)" class="has-inline-color">user.js</mark></code> and <code><mark style="background-color:var(--ast-global-color-6)" class="has-inline-color">address.js</mark></code>. So, In the HTML file need to add a statement like below</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-html" data-lang="HTML"><code>&lt;script type=&quot;module&quot; src=&quot;main.js&quot; &gt;&lt;/script&gt;</code></pre></div>



<h4 class="wp-block-heading"><strong>Named Imports</strong>:</h4>



<p>you can see below code there is added statement <br><mark style="background-color:var(--ast-global-color-6)" class="has-inline-color"><code>import {getCity, addressId} address from './address.js';</code></mark><br>In which <mark style="background-color:var(--ast-global-color-6)" class="has-inline-color"><code>getCity, addressId</code></mark> are the function and variable and <mark style="background-color:var(--ast-global-color-6)" class="has-inline-color"><code>./address.js</code></mark> path of the file in which function and variable are defined.<br></p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>// Filename : main.js 
//---------------------------
import {getCity, addressId} address  from &#39;./address.js&#39;; 
console.log(getCity()); // will print Noida
console.log(addressId); // will print  25</code></pre></div>



<h4 class="wp-block-heading"><strong>Renaming Imports</strong>:</h4>



<p>For code readability or any purpose if need to rename the name of a function, variable, or class name then in the module feature you can do it same thing explored by below code.</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>import {addressId as id}  from &#39;./address.js&#39;;
console.log(id) //will print 25</code></pre></div>



<p>Above code, you can see addressId changed as id and print the same.</p>



<h4 class="wp-block-heading"><strong>Import All</strong>:</h4>



<p>In the module import, you can import all function methods and variables in a single variable an object by using using <code><mark style="background-color:var(--ast-global-color-6)" class="has-inline-color">* as</mark></code>  so, that no need to import separately same thing explain by code.</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>import * as address  from &#39;./address.js&#39;;
console.log(address.getCity()); // Will print Noida
console.log(address.addressId); // will print id 25</code></pre></div>



<h4 class="wp-block-heading">Default import </h4>



<p>Now let me show how can import the default exported module more and less it works like importing all but there is no need to write <code><mark style="background-color:var(--ast-global-color-6)" class="has-inline-color">* as</mark></code> . </p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>import user  from &#39;./user.js&#39;;
console.log(user.username); // will print Jhon</code></pre></div>



<p>You can also rename in default import.</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>import u  from &#39;./user.js&#39;;
console.log(u.username); // will print Jhon</code></pre></div>



<h3 class="wp-block-heading">Benefits of Using Modules</h3>



<ul>
<li><strong>Encapsulation</strong>: Modules make code isolated, you can maintain a global namespace more freely by making block-scoped or module-based code.</li>



<li><strong>Reusability</strong>: The same method and variable can be used anywhere there is no need to define and write code again and again.</li>



<li><strong>Maintainability</strong>: Code becomes more organized and readable so that team members or code reviewers can easily understand the code and easy to maintain future.</li>
</ul>



<h2 class="wp-block-heading">class &amp; object / oops concept in javascript es6</h2>



<p>It is used in approximately all programming languages like PHP, Python, Java, and Javascript. Class-based code has many features like code reusability, readability also helps in memory optimization. It&#8217;s a blueprint for creating objects. This feature of javascript es6 is used by many popular frameworks like React, angular, and nextJs. Class code structure definition and calling are the same in all languages only syntax differences are there. Please check the below example for class.</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>class userDetail{
	// Default constructor
	constructor(n){
		this.name = n;
		this.source = &quot;Default&quot;;
	}
	// Individual variable
	user_id = 10;
	// Arrow function
	address = () =&gt; {
		return {city:&quot;Noida&quot;,state:&quot;UP&quot;,country:&quot;India&quot;};
	}
}
let user = new userDetail(&quot;Jhon&quot;); // Set default name by constructor
console.log(user.user_id); // Will print 10
console.log(user.name); // will print Jhon
console.log(user.address().city); // Will print Noida</code></pre></div>



<p>We have defined a constructor which calls when the class is initialized and we can assign variable value. We can do all things in class that we can do in global space like define arrow function and define normal variables.</p>



<h3 class="wp-block-heading">Class Inheritance in javascript es6</h3>



<p>The code that is already defined or written needs to be reused in the context of inheritance. For example in the <code><mark style="background-color:var(--ast-global-color-6)" class="has-inline-color">class userDetail</mark></code> the written method and variable need to be used and write the next code then it&#8217;s possible by Inheritance. The code extended by keyword extends then adds the class name like <code><mark style="background-color:var(--ast-global-color-6)" class="has-inline-color">extends userDetail</mark></code></p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>class cart extends userDetail{

	getProducts(){
		return [&quot;Apple Mobile&quot;,&quot;Boat Headphone&quot;,&quot;Mobile Charger&quot;];
	}
}
let user = new cart(&quot;Jhon&quot;); // Set default name by constructor
console.log(user.user_id);   // Will print 10
console.log(user.name); // will print Jhon
console.log(user.getProducts()[0]); // will print Apple Mobile</code></pre></div>



<p>The variable user_id and name is not defined in the class cart but still print name and user_id because the code of existing <code><mark style="background-color:var(--ast-global-color-6)" class="has-inline-color">class  userDetail</mark></code> added or Inherited in <code><mark style="background-color:var(--ast-global-color-6)" class="has-inline-color">class cart</mark></code></p>



<h2 class="wp-block-heading">Array and object Destructuring in in javascript es6</h2>



<p>Assigning values from array or object to a variable or you can say unpack values from an array and assign them to variables.</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>const colors = [&#39;red&#39;, &#39;green&#39;, &#39;blue&#39;];
const [first, second, third] = colors;

console.log(first);  // Output: &#39;red&#39;
console.log(second); // Output: &#39;green&#39;
console.log(third);  // Output: &#39;blue&#39;</code></pre></div>



<p>In this, if want skip any variable you can do it by skipping assigned variable like below.</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>const colors = [&#39;red&#39;, &#39;green&#39;, &#39;blue&#39;];
const [first, second] = colors;
console.log(first);  // Output: &#39;red&#39;
console.log(second); // Output: &#39;green&#39;</code></pre></div>



<h4 class="wp-block-heading">Object Destructuring</h4>



<p>You can assign properties to variables by unpacking them from an object utilizing object destructuring. Unless you provide an alternative name, the variable names must correspond to the property names.</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>const person = { name: &#39;Alice&#39;, age: 25, city: &#39;New York&#39; };
const { name, age, city } = person;
console.log(name); // Output: &#39;Alice&#39;
console.log(age);  // Output: 25

// You can rename variable in object destructuring 

const person = { name: &#39;Alice&#39;, age: 25 };
const { name: personName, age: personAge } = person;
console.log(personName); // Output: &#39;Alice&#39;
console.log(personAge);  // Output: 25</code></pre></div>



<h2 class="wp-block-heading">spread and rest operator in javascript es6</h2>



<p> Both operators are represented by three dots <code><mark style="background-color:var(--ast-global-color-6)" class="has-inline-color">...</mark></code> with the help of these, we can collect the data and spread the next place and also provide flexibility to collect data for function.</p>



<h3 class="wp-block-heading">Spread Operator</h3>



<p>This operator spreads the value of the addition of value to the next variable it works with both array and object. Let&#8217;s understand by code.</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>let carBrand = [&quot;Audi&quot;,&quot;Ferrai&quot;,&quot;Hudai&quot;];
let autoBrand = [...carBrand, &quot;Tata&quot;, &quot;Nissan&quot;];
console.log(autoBrand); // will print [ &#39;Audi&#39;, &#39;Ferrai&#39;, &#39;Hudai&#39;, &#39;Tata&#39;, &#39;Nissan&#39; ]

let postAutoBrand = [&quot;Tata&quot;, &quot;Nissan&quot;, ...carBrand];
console.log(postAutoBrand); // will print [ &#39;Tata&#39;, &#39;Nissan&#39;, &#39;Audi&#39;, &#39;Ferrai&#39;, &#39;Hudai&#39; ]</code></pre></div>



<p>In the above code, we have defined three brands in variable <code>carBrand</code>. Now these three values spread in variable autoBrand by using <mark style="background-color:var(--ast-global-color-6)" class="has-inline-color">…</mark> and with the use of spread, you can add values at the start and end of indexing.</p>



<h3 class="wp-block-heading">Rest operator</h3>



<p>It also works the same as the rest operator spread operator works for copy values but the rest operator works for the collection of multiple values or data.<br><strong>Use Case </strong>: <br>Suppose a function needs to pass a dynamic parameter like below.</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>function userList(user1, user2, user3){
    return [user1,user2, user3];
}
console.log(userList(&quot;Jhon&quot;, &quot;Ram&quot;, &quot;Nick&quot;)); // [ &#39;Jhon&#39;, &#39;Ram&#39;, &#39;Nick&#39; ]
console.log(userList(&quot;Jhon&quot;)); // [ &#39;Jhon&#39;, undefined, undefined ]</code></pre></div>



<p>You can see that when we did not pass all three parameters in the second call. Then it added undefined on places 2nd and 3rd. So, to fix this issue we have to use the rest operator which collects values in an array format</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-plain"><code>function userList(...users){
    return users;
}
console.log(userList(&quot;Jhon&quot;, &quot;Ram&quot;, &quot;Nick&quot;)); // [ &#39;Jhon&#39;, &#39;Ram&#39;, &#39;Nick&#39; ]
console.log(userList(&quot;Jhon&quot;)); //[ &#39;Jhon&#39; ]</code></pre></div>



<p>Now you can see there is no undefined error the values which you defined will collect it if not then no undefined.</p>



<h4 class="wp-block-heading">Destructuring with Rest Operator</h4>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>const fruits = [&#39;apple&#39;, &#39;banana&#39;, &#39;cherry&#39;, &#39;date&#39;];
const [first, second, ...rest] = fruits;

console.log(first);  // Output: &#39;apple&#39;
console.log(second); // Output: &#39;banana&#39;
console.log(rest);   // Output: [&#39;cherry&#39;, &#39;date&#39;]</code></pre></div>



<h2 class="wp-block-heading">Refrence &amp; premitive type variable assigning</h2>



<p>In Primitive type data types (number, string, Symbol, bigint) these are immutable means in this variable the values are directly copied.</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>let x = 10;
let y = x; // y is now a copy of x&#39;s value
y = 20;    // changing y does not affect x

console.log(x); // 10
console.log(y); // 20</code></pre></div>



<p>The reference type data type (array &amp; object) not directly values are copied during variable assign there is referencing the pointer that is in memory it will more clearer from the below example.</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>let username = { name:&quot;Rakesh Kumar&quot; }
let username2 = username;
console.log(username);// Will print { name: &#39;Rakesh Kumar&#39; }
console.log(username2); // Will print { name: &#39;Rakesh Kumar&#39; }
username2.name=&quot;Jhon&quot;;
console.log(username);// Will print { name: &#39;Jhon&#39; } but expected Rakesh Kumar
console.log(username2); // Will print { name: &#39;Jhon&#39; }</code></pre></div>



<p>In the above example the variable contains the <code><mark style="background-color:var(--ast-global-color-6)" class="has-inline-color">name</mark></code> &#8220;Rakesh Kumar&#8221; Before manipulating the variable <code><mark style="background-color:var(--ast-global-color-6)" class="has-inline-color">username2</mark></code> was print <code><mark style="background-color:var(--ast-global-color-6)" class="has-inline-color">{ name: 'Rakesh Kumar' }</mark></code> but after changing the value in<code><mark style="background-color:var(--ast-global-color-6)" class="has-inline-color"> username2.name</mark></code> both are print<code><mark style="background-color:var(--ast-global-color-6)" class="has-inline-color"> { name: 'Jhon' }</mark></code> but we changed in <code><mark style="background-color:var(--ast-global-color-6)" class="has-inline-color">username2</mark></code> and username change itself. It happens because both are references to the same location. There is no direct copy of the values.</p>



<p>Now how can we fix this issue so that we can copy the values of one object to another and the original object should be the same or not any modification there? For this, we can use a<strong> spread operator</strong>.</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>let username = { name:&quot;Rakesh Kumar&quot; };
let username2 = {...username};
console.log(username);// Will print { name: &#39;Rakesh Kumar&#39; }
console.log(username2); // Will print { name: &#39;Rakesh Kumar&#39; }
username2.name=&quot;Jhon&quot;;
console.log(username);// Will print { name: &#39;Rakesh Kumar&#39; }
console.log(username2); // Will print { name: &#39;Jhon&#39; }</code></pre></div>



<h2 class="wp-block-heading">Array map and array filter in javascript es6</h2>



<h3 class="wp-block-heading">Array Map:</h3>



<p>By giving each element of an existing array a function, the <code><mark style="background-color:var(--ast-global-color-6)" class="has-inline-color">map()</mark></code> method generates a new array. Every element receives a new value from this method, which <code><mark style="background-color:var(--ast-global-color-6)" class="has-inline-color">map()</mark></code> then aggregates into the new array. The original array and its values remain unchanged.</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>const numbers = [1, 2, 3, 4];
const multiplier = numbers.map(num =&gt; num * 2);
console.log(multiplier); // [2, 4, 6, 8]
console.log(numbers); // [1, 2, 3, 4] (original values unchanged)</code></pre></div>



<h3 class="wp-block-heading">Array filter</h3>



<p>The name filter clearly states that the <code><mark style="background-color:var(--ast-global-color-6)" class="has-inline-color">filter() </mark></code>used for filter the values of the array on the certain business logic or conditions. In this also original array and its values are not changed it creates a new array on the condition <code><mark style="background-color:var(--ast-global-color-6)" class="has-inline-color">true</mark></code>.</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-js" data-lang="JavaScript"><code>const numbers = [1, 2, 3, 4, 5];
const evenNumbers = numbers.filter(num =&gt; num % 2 === 0);
console.log(evenNumbers); // [2, 4]
console.log(numbers);      // [1, 2, 3, 4, 5] (original array remains unchanged)
</code></pre></div>



<h2 class="wp-block-heading">Conclusion</h2>



<p>The complete post is written in keep min in javascript es6. It is a brief discussion about es6 concepts so that you can understand the latest framework and libraries like react, angular, Vue, and react. These front-end technologies are most popular those days but they all use modern javascript concepts. So, I hope you will enjoy the post and try to start learning new frameworks or libraries. Thanks for reading the article.</p>
<p>The post <a rel="nofollow" href="https://www.postnidea.com/a-refreshing-dive-into-javascript-es6-concepts/">A Refreshing Dive into JavaScript ES6 Concepts</a> appeared first on <a rel="nofollow" href="https://www.postnidea.com">Postnidea</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>6 tips for optimized and secure WordPress during development</title>
		<link>https://www.postnidea.com/6-tips-for-optimized-and-secure-wordpress-during-development/</link>
		
		<dc:creator><![CDATA[Rakesh Kumar]]></dc:creator>
		<pubDate>Mon, 11 Nov 2019 05:17:36 +0000</pubDate>
				<category><![CDATA[woocommerce]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress plugin]]></category>
		<category><![CDATA[Plugin development]]></category>
		<category><![CDATA[wordpress code]]></category>
		<guid isPermaLink="false">https://www.postnidea.com/?p=229</guid>

					<description><![CDATA[<p>WordPress is a very popular CMS. All-around the world most of the sites are built using WordPress. WordPress is available [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.postnidea.com/6-tips-for-optimized-and-secure-wordpress-during-development/">6 tips for optimized and secure WordPress during development</a> appeared first on <a rel="nofollow" href="https://www.postnidea.com">Postnidea</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>WordPress is a very popular CMS. All-around the world most of the sites are built using WordPress. WordPress is available for users in two ways. It&#8217;s also usable for the blogger they can be used without any cost. The users need to just sign up on the wordpress.com &amp; start writing a post for the blog. The wordpres.com is responsible for all other challenges like maintenance, uptime &amp; optimization. It also avails a lot of things for users like theme widgets. If you interested more then you go through the <a href="https://wordpress.com/start/user?ref=postnidea">link</a>.</p>
<p>The second option for the user is self-hosted WordPress. In this WordPress provide you setup in zip format so that user can download it. Now the user has good command over the blog or website. He can do everything whichever he wants. The WordPress is hosted on user hosting so the user will responsible for other things like performance, security, SEO &amp; blog uptime.<br />
Today I want to explain some other things so I don&#8217;t want to go in deep knowledge.</p>
<p>Generally, people have the myth WordPress not more secure or you can develop an only simple informational site. But It&#8217;s completely wrong you can develop anything using WordPress &amp; will work securely. WordPress CMS is a gravy of your dish So, it depends upon you how to use if you maintain a WordPress coding standard then definitely your application will generate good revenue. Today I will share some points which should be kept in mind from the phase of development. So after development when you start work for the security &amp; performance then your work effort become decrease. These are very basic things but most of the peoples missed it. I have created a list of these which is below.</p>
<h2>Perfect placement of files.</h2>
<p>when things are placed properly then they make sense otherwise difficult to maintain. So whenever you create a theme or plugin then maintain the proper standard file structure. I have shown you a file structure for the plugin is below.</p>
<p>One more important thing is that always make plugin frontend compatible by using templates &amp; they should be overridable so that easy to use plugin &amp; override frontend without editing plugin. Same thing I also suggest for the theme So that in future if there is an issue in this case if the standard structure is there then easy to any developer debug.</p>
<h2>Naming convention &amp; declaration of variable, constant</h2>
<p>In programming, the naming convention very important, especially in WordPress, try to define the unique name of the variable, constant &amp; class so there is less chance to conflict with other plugins. The variable value used recursively then it should define in the starting lines. Because some time value fills in the variable from the database or some other where if we not define then it always triggers database query or procedure. The name of the variable &amp; constant should be meaning full so that easy to code review.</p>
<h2>Maximum use of WordPress core things</h2>
<p>The peoples are used the opensource because most of the things already built in it. The open-source provides a collection of hooks, filters &amp; methods we need to use them. The benefit of using them is that if the upgrade or maintain anything in these then your functionality never breaks &amp; you will also not need to eject the latest changes in our functionality. If you use inbuilt functions again and again then your development speed also increases because after a certain time you will grasp up maximum functions.</p>
<h2>wp-config usage</h2>
<p>The wp-config.php is the main configuration file for the WordPress in which all settings like DB &amp; constant defined in it. It gets all details from a wp-config.php file like database, salt keys, cache, debug, etc. So always use the defined constant, sometimes peoples defined error display enable/ disable using functions.php which wrong practice. So bad practice of code always consumes more time during maintenance or enhancements.</p>
<h2>Proper versioning</h2>
<p>Version controlling is the process by which we identify a change chain log. It will greatly help in issue debug. So whenever you add major changes in the plugin then the version of the plugin should be updated. Always use the updated plugin because of sometimes plugin developer done the major things related to security if you miss that update then you will eject security threat in the application.</p>
<h2>Proper security during code</h2>
<p>During the coding, security should be very important otherwise your application is not beneficial for the user because the hacker can easily break it. So always use the input sanitization. For sanitization, WordPress provides lots of functions which is already available. During the installation of WordPress setup change the salt keys, Database prefix should be changed from the default which will add one more step towards the security.</p>
<h2>proper understanding of the functions (fastest &amp; best function)</h2>
<p>In WordPress for a certain task available multiple hooks &amp; functions so review the function properly &amp; try to understand the code of function then use the most efficient appropriate function instead of any function.</p>
<h2>Avoid modifying core, plugin, parent them</h2>
<p>In any opensource, if you changed the core files then you simply break the updates or functionality. Another most important thing is that whenever you get a new update then your customization becomes goes. So always try to implement our requirement in the child theme or our theme so that no need to customize core.</p>
<h2>Not Checking If a Plugin Is Active</h2>
<p>If your code dependent on the certain plugin of class then always implement the checks so that if the dependent thing is not available then, in that case, your functionality or plugin can&#8217;t be a break. You can apply plugin checks using the below code.<br />
if ( is_plugin_active( &#8216;plugin-folder/plugin-main-file.php&#8217; ) ) {<br />
// Run plugin code<br />
}<br />
In the same way, you should also need to apply the function, class checks.</p>
<h2>Loading Too Many Resources</h2>
<p>Never load CSS and js in head or footer directly because it&#8217;s bad practice. Sometimes I have seen that people add the jquery library, juqrey-ui library or other libraries (default) which is standard and already available in the core then why people are used. Always add CSS &amp; js using below functions which standard. Always try to use standard functions for these tasks which are below.</p>
<h2>Keeping the Admin Bar</h2>
<p>During the initial time, I disabled the admin bar for checking responsive &amp; other things. But it&#8217;s bad practice it will lose the user experience. So always keep the admin-bar visible so that end-user can perform default functions like editing, view navigate dashboard easily.</p>
<h2>Not Utilizing the GetText Filter[translatable]</h2>
<p>Different people have different region but they want to taste your recipe (themes, plugin). But translation is not available to our audience that is the biggest problem. If such type of issue present then your plugin or theme will not use more. So always create textdomain &amp; load at the time of theme or plugin load so that your stuff becomes translatable. The WordPress translate plugin like loco translate, wpml both, is used the textdomain &amp; translate your stuff in the user language.</p>
<p>The things which I know &amp; faced I have to explain to you. I think if you follow these things your application has good performance &amp; secured. If you do the above things then at the time security &amp; performance optimization you will save a lot of time. If you have more things about the above then you can share it with us. I always welcome suggestions &amp; feedback.</p>
<p>The post <a rel="nofollow" href="https://www.postnidea.com/6-tips-for-optimized-and-secure-wordpress-during-development/">6 tips for optimized and secure WordPress during development</a> appeared first on <a rel="nofollow" href="https://www.postnidea.com">Postnidea</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Start develop chrome extension using javascript in 10 minutes</title>
		<link>https://www.postnidea.com/start-develop-chrome-extension-using-javascript-in-10-minutes/</link>
		
		<dc:creator><![CDATA[Rakesh Kumar]]></dc:creator>
		<pubDate>Mon, 04 Feb 2019 04:37:00 +0000</pubDate>
				<category><![CDATA[chrome extension]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Chrome Extension]]></category>
		<category><![CDATA[Jquery]]></category>
		<guid isPermaLink="false"></guid>

					<description><![CDATA[<p>&#8220;It is never too late to learn&#8221;. You know I am late to this experiment. Because people already implemented that. [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.postnidea.com/start-develop-chrome-extension-using-javascript-in-10-minutes/">Start develop chrome extension using javascript in 10 minutes</a> appeared first on <a rel="nofollow" href="https://www.postnidea.com">Postnidea</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div dir="ltr" style="text-align: left;">
<p style="text-align: justify;">&#8220;It is never too late to learn&#8221;. You know I am late to this experiment. Because people already implemented that. If you have a little bit knowledge of javascript or jquery you can easily create an app for google chrome web store. Web chrome store provides facility to peoples can upload their extensions &amp; publish it publicly. Due to this chrome user have the chance to taste different types of app recipe. One week an ago I was working on an extension at this time I learned about the chrome extension development same thing I share with you.</p>
<h2>File Structure</h2>
<p>Before starting anything let me show you the structure of the extension</p>
<p><img decoding="async" class="alignnone size-full wp-image-154" src="https://www.postnidea.com/wp-content/uploads/2019/02/postnidea-weather-now-file-structure.jpg" alt="" width="235" height="296" /></p>
<p>You can also directly browse my repository by using link <a href="https://github.com/rakeshkumar125/postnidea-weather-now">https://github.com/rakeshkumar125/postnidea-weather-now</a></p>
<h2>Header Information</h2>
<p>Let me first explain the manifest.json file.</p>
<p><script src="https://gist.github.com/rakeshkumar125/9b9381c784091a6cfe751b21d1fcbec3.js"></script></p>
<p>You can see the name, version, description is the fields that contain identification information.</p>
<p style="text-align: justify;">Permission field contains the name of the fields for which you extension need permission to modify or access. Right now I have added only a single one storage but you can allow permission to other fields according to your needs. You can get more information using <a href="https://developer.chrome.com/extensions/declare_permissions" target="_blank" rel="noopener noreferrer">link</a></p>
<p>Icons are the field which contains the set of images which shows for the chrome extension logo on a different resolution.</p>
<p>&#8220;homepage_url&#8221; is the field which contains the publisher or developer website URL so that end user can get the information.</p>
<p>&#8220;browser_action&#8221; field contains the list of resources that will be called when the user performs the action on the browser like click on the chrome extension etc.  In my case, it contains the &#8220;default_popup&#8221; field in which I have defined the name of the file which is called when the user clicks on the chrome extension logo. &#8220;default_icon&#8221; field which contains images for different resolutions.</p>
<p>&#8220;manifest_version&#8221; is the field which contains the version of the manifest file.</p>
<h2>Look &amp; Feel or Client side design</h2>
<p>Now let me start explanation another important file popup.html</p>
<p><script src="https://gist.github.com/rakeshkumar125/557cbee03e2c043a663876323006eb48.js"></script></p>
<p>In above you can see that I have added the HTML part of the extension which is shown when user click on the icon then the user will see the popup content. In the head, I have added two scripts files &#8220;jquery.min.js&#8221; and &#8220;popup.js&#8221;. The &#8220;jquery.min.js&#8221; is the library file which supports for the javascript with the help of that I can user jquery in the extension.</p>
<p>After that, you can see the body part you can see I have added the DIV with id &#8220;weather-report&#8221;. Initially, it has shown with loading image once data fetched from API then it&#8217;s loaded with the report.</p>
<h2>Implement Extension Logic</h2>
<p>Last but not least file &#8220;popup.js&#8221;. You can see the code is below.</p>
<p><script src="https://gist.github.com/rakeshkumar125/f1e51bbb354ad3799601957213c6818d.js"></script></p>
<p>You can see the I first checked that user is connected with the internet or not by using function &#8220;navigator.onLine&#8221;. If the user is online then start preparing the weather report otherwise it will just show the message for connecting to the internet.</p>
<p>If the user connects with internet then I got the current use latitude and longitude of the user by the API (<a href="https://ipv6.ip.nf/me.json" target="_blank" rel="noopener noreferrer">https://ipv6.ip.nf/me.json</a>) which is free. Once I got the user latitude and longitude then Trigger another API (<a href="https://api.openweathermap.org">api.openweathermap.org</a>) for weather report which is also free. After getting weather JSON data then I create HTML using function &#8220;getReportHTML&#8221;.</p>
<p>Finally, load the report to the popup.</p>
<p>You can also check out above explanation using video.</p>
<p>You can also enjoy live demo by clicking on below URL</p>
<p><a href="https://chrome.google.com/webstore/detail/postnidea-weather-now/jiapbdoeogpgpeggldgdhcdalhdchgae" target="_blank" rel="noopener noreferrer">https://chrome.google.com/webstore/detail/postnidea-weather-now/jiapbdoeogpgpeggldgdhcdalhdchgae</a></p>
<p>If you have any query or suggestions you can share by comment.</p>
</div>
<p>The post <a rel="nofollow" href="https://www.postnidea.com/start-develop-chrome-extension-using-javascript-in-10-minutes/">Start develop chrome extension using javascript in 10 minutes</a> appeared first on <a rel="nofollow" href="https://www.postnidea.com">Postnidea</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>angular 6 tutorial for routing and navigation</title>
		<link>https://www.postnidea.com/angular-6-tutorial-for-routing-and-navigation/</link>
					<comments>https://www.postnidea.com/angular-6-tutorial-for-routing-and-navigation/#respond</comments>
		
		<dc:creator><![CDATA[Rakesh Kumar]]></dc:creator>
		<pubDate>Wed, 22 Aug 2018 02:07:00 +0000</pubDate>
				<category><![CDATA[angular 6]]></category>
		<category><![CDATA[angularjs]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Angular]]></category>
		<category><![CDATA[angular 7 routing not working]]></category>
		<category><![CDATA[angular cli add routing]]></category>
		<category><![CDATA[angular navigation]]></category>
		<category><![CDATA[angular routing tutorial]]></category>
		<category><![CDATA[how angular routing works]]></category>
		<category><![CDATA[Navigation]]></category>
		<category><![CDATA[router outlet angular 6]]></category>
		<category><![CDATA[Routing]]></category>
		<guid isPermaLink="false"></guid>

					<description><![CDATA[<p>Routing a very important part of any application. Routing is a way by which user can navigate your application. Routing [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.postnidea.com/angular-6-tutorial-for-routing-and-navigation/">angular 6 tutorial for routing and navigation</a> appeared first on <a rel="nofollow" href="https://www.postnidea.com">Postnidea</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div dir="ltr" style="text-align: left;">
<div dir="ltr" style="text-align: left;">
<p>Routing a very important part of any application. Routing is a way by which user can navigate your application. Routing is defined by the developer on which route what things need to serve towards client or user. On routing other hidden things also dependent like SEO &amp; feeds. So Bad routing can spoil you application &amp; leave a bad impression on the user. Different technology different way of routing. But front-end user experiences the same.</p>
<p>I have worked on PHP as well as the JS So, I can give the idea about two technologies. For PHP if you using any framework like Codeigniter, CakePHP they already have the option for routing. But If you create PHP application by using class structure then you can use already popular class Altorouter. I have so many options regarding the routing. For more information regarding Altorouter, you can click on the link.</p>
<p>For javascript I working on the angular. The angular has our library with the help of that Angular manage routing. Now today I will show you how angular 5 or angular 6 working. After starting of angular version 2 the angular start using typescript.</p>
<p>Now today I will show you how routing work in the angular 5 or angular 6. So for demonstrating routing in Angular 6, I have to create an application. So with the use of angular CLI tool, you can easily create a new project using the below command.</p>
<h2>Angular generate new application</h2>
<pre><code>ng new {application_name}  or ng new test112</code></pre>
</div>
<p>I create an application for you on your specified path and also install the required packages so that your application will work perfectly.<br />
I will take a few time so, wait with patience. Once your application created then type below command so that your application will open in the browser.</p>
<pre><code>ng serve --open</code></pre>
<p>Above command will compile your typescript and convert in js then compiler compiled thing serve to the browser. There is &#8211;open stand for open browser otherwise. The browser will need to open itself. Now created application working fine.</p>
<h2>Addition of new module in angular application</h2>
<p>Before starting anything few more module I need to install jquery, bootstrap which helps to create awsome UI Design.</p>
<pre><code>npm install bootstrap@3.3.7 jquery --save</code></pre>
<p>After successful installation, we need to add a path in the angular.json file like below which is exist on your application root.</p>
<pre><code>"styles": [
              "./node_modules/bootstrap/dist/css/bootstrap.min.css",
              "src/styles.css"
            ],
            "scripts": [
              "./node_modules/jquery/dist/jquery.js",
              "./node_modules/bootstrap/dist/js/bootstrap.js"
            ]
</code></pre>
<p>There is app.componet.ts already found in the app folder. Now we need to create three pages so that I show perfect routing navigation.<br />
So I will type below commands.</p>
<pre><code>ng generate component home
ng generate component about
ng generate component contact
</code></pre>
<p>Above commands will create three pages for your application. Now one file needs to create app.router.ts which is responsible to complete routing.  In this file, I have to import three ( ModuleWithProviders, Routes, RouterModule)modules which is below.</p>
<pre><code>import { ModuleWithProviders } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
</code></pre>
<p>I also need to define create page component like below. So that I can include routes variable.</p>
<pre><code>import { HomeComponent } from './home/home.component';
import { AboutComponent } from './about/about.component';
import { ContactComponent } from './contact/contact.component';
</code></pre>
<h2>Addition of Routing file</h2>
<p>Now I have define a routes array. So that we can store all routes in this variable like below.</p>
<pre><code>export const routes: Routes =[
{path:'home', component: HomeComponent},
{path:'about', component: AboutComponent},
{path:'contact', component: ContactComponent},
];
</code></pre>
<p>export const routing : ModuleWithProviders = RouterModule.forRoot(routes);</p>
<p>Now app.router.ts file is ready finally add to app.module.ts &amp; import module routing using below code.</p>
<pre><code>import { routing } from './app.router';
imports: [
    BrowserModule,
    FormsModule,
    routing]
</code></pre>
<p>Now finally add the navigation to the app.component.html. So the code will look like below.</p>
<p>routerLink=&#8217;home&#8217; will generate the link for the home component &amp; &#8220;routerLinkActive&#8221; will add the active class on the active route.</p>
<p>One more thing needs to add the &lt;router-outlet&gt;&lt;/router-outlet&gt; so that all component will show their data in it.</p>
<p>Finally, you can view the output.</p>
<h2>Above code works in below video</h2>
<p><iframe src="https://www.youtube.com/embed/ljkhCvNwJQ4" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p>
<p><a class="btn btn-primary btn-blue" href="http://demo.postnidea.com/test112/" target="_blank" rel="noopener noreferrer">Demo</a> <a class="btn btn-primary btn-blue" href="https://github.com/postnidea/angular-6-tutorial-for-routing-and-navigation" target="_blank" rel="noopener noreferrer">code</a></p>
</div>
<p>The post <a rel="nofollow" href="https://www.postnidea.com/angular-6-tutorial-for-routing-and-navigation/">angular 6 tutorial for routing and navigation</a> appeared first on <a rel="nofollow" href="https://www.postnidea.com">Postnidea</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.postnidea.com/angular-6-tutorial-for-routing-and-navigation/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>php data scraping techniques</title>
		<link>https://www.postnidea.com/php-data-scraping-techniques/</link>
		
		<dc:creator><![CDATA[Rakesh Kumar]]></dc:creator>
		<pubDate>Sun, 15 Apr 2018 18:47:00 +0000</pubDate>
				<category><![CDATA[Data mining]]></category>
		<category><![CDATA[Data scraping]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[php class]]></category>
		<category><![CDATA[php data scraping]]></category>
		<category><![CDATA[Data Mining]]></category>
		<category><![CDATA[Data Scraping]]></category>
		<guid isPermaLink="false"></guid>

					<description><![CDATA[<p>Data is very important for an organization. With the help of data, an organization can generate a lot of business. [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.postnidea.com/php-data-scraping-techniques/">php data scraping techniques</a> appeared first on <a rel="nofollow" href="https://www.postnidea.com">Postnidea</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div dir="ltr" style="text-align: left;">
<p>Data is very important for an organization. With the help of data, an organization can generate a lot of business. It works same as like fuel for an engine. Quality of data will increase your business. But the question comes out how to collect data. There are various ways you can collect the data for our organization or business. There is a lot of platforms that provide you paid data.  They charge a small amount of money &amp; will provide you a data. Another way to scarp data from document, website or text file.</p>
<p>Data scraping is that way from which you can extract the required data. The data available on the web pages, XML feed, post feeds but there is a no way to save data in a required format so that it can easy to navigate  &amp; usage. With the help of data scraping, you can extract &amp; save data in the data source and can be used for our business strategy.</p>
<h2 style="text-align: left;">Why people do scrap</h2>
<div style="text-align: left;"></div>
<ul>
<li>collect the current price of the products so that competitors can analyze the market.</li>
<li>Get always updated data when no API  communication source is available.</li>
<li>Generate the business lead from the contact details.</li>
<li>survey usage so  that you can collect the poll data</li>
</ul>
<p>&nbsp;</p>
<h2 style="text-align: left;">How can be achieved?</h2>
<p>There is different language platform provides a different way. I belong to PHP so, I will show a method that used PHP.  With the Use of PHP, you can use three-way from which you extract the data.</p>
<div style="text-align: left;"></div>
<ul>
<li>Document Parsing</li>
<li>Jquery Like PHP Library(simple_html_dom)</li>
<li>Regular Expressions</li>
</ul>
<p>&nbsp;</p>
<div style="text-align: left;"></div>
<p>Before explaining above three techniques I want to take some HTML structure. So that I can use in explaining techniques.</p>
<p><script src="https://pastebin.com/embed_js/Gc2THL6M"></script></p>
<p>Above code will display a list of users. Now I try to extract above users &amp; show in the array.</p>
<p>Now before starting this, we need to get the html structure using URL. In PHP there is two functions are available which get the HTML of the page using URL file_get_contents, another using curl. Curl is very effective because it works faster, extract HTML structure even SSL available. So, Now I create a function return an HTML structure of the page using URL using curl.</p>
<p><script src="https://pastebin.com/embed_js/ZTuDMU6Z"></script></p>
<p>Now with the use of above function, you can get the HTML structure of the page. Now I  explain you data extraction technique one by one.</p>
<h2 style="text-align: left;">PHP Document Parsing</h2>
<p>It simply loads the HTML document &amp; parses into a tree. You can simply say it convert HTML document to XML. With applying query you can extract the data. But its&#8217;s time-consuming process because first it loads &amp; parses structure then your query will work. For long HTML structure document, it consumes a lot of memory. Now I show example code that will show you how it works.</p>
<h2 style="text-align: left;">Jquery Like PHP Library(simple_html_dom) for data scrap</h2>
<p>It&#8217;s also a same above like document parsing. But With the help of class like simple_html_dom, Scraper, hQuery make easy to use. If you are comfortable with jquery then the class will make your life easy. They work like just a jquery functions. Now I show you an example that uses the simple_html_dom library. You can download library using below link &amp; include in our code.</p>
<p>https://sourceforge.net/projects/simplehtmldom/</p>
<h2 style="text-align: left;">Regular Expressions</h2>
<p>It&#8217;s very fast processing data scrap techniue. It&#8217;s not parsing the HTML structure into XML or tree. It treat HTML structure as string &amp; perform serach operation. But for creating regular expression according business logic it&#8217;s very time consuming. Currenty I have taken simple structure.</p>
<p><script src="https://pastebin.com/embed_js/Pcm1uaY5"></script></p>
<p>Now finally I will recommend regular expression technique if you plan for large data extraction. Last but not least never use the browser for data extraction always try to use terminal or command prompt for data scrapping so that your script will run for the longtime &amp; data will be extracted without distortion.</p>
</div>
<p>The post <a rel="nofollow" href="https://www.postnidea.com/php-data-scraping-techniques/">php data scraping techniques</a> appeared first on <a rel="nofollow" href="https://www.postnidea.com">Postnidea</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Top 10 WordPress plugin make development faster</title>
		<link>https://www.postnidea.com/top-10-wordpress-plugin-make-development-faster/</link>
					<comments>https://www.postnidea.com/top-10-wordpress-plugin-make-development-faster/#respond</comments>
		
		<dc:creator><![CDATA[Rakesh Kumar]]></dc:creator>
		<pubDate>Sun, 25 Mar 2018 17:21:00 +0000</pubDate>
				<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[woocommerce]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress plugin]]></category>
		<category><![CDATA[Ecommerce]]></category>
		<category><![CDATA[Plugin development]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://www.postnidea.com/top-10-wordpress-plugin-make-development-faster/</guid>

					<description><![CDATA[<p>Most of time designer &#38; developer both are working on the WordPress projects. But if the designer has a little [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.postnidea.com/top-10-wordpress-plugin-make-development-faster/">Top 10 WordPress plugin make development faster</a> appeared first on <a rel="nofollow" href="https://www.postnidea.com">Postnidea</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div dir="ltr" style="text-align: left;">
<p>Most of time designer &amp; developer both are working on the WordPress projects. But if the designer has a little bit knowledge of PHP &amp; WordPress basics then he can also complete project itself. In that case, an organization can save the developer efforts &amp; the saved efforts can utilize on urgent tasks. Now today I have shown you few WordPress plugins can make your WordPress development faster.</p>
<p>Few important things need to do to start WordPress project.<br />
&#8211; When you start WordPress installation then always use a unique prefix for the WordPress database table.<br />
&#8211; Always set our custom keys<br />
&#8211; Whenever you customize MySQL query then always use $wpdb-&gt;prefix.</p>
<h2>1. Visual Composer</h2>
<p>It&#8217;s paid plugin but it has most important features. A normal user can also design our website without the need of a designer. It&#8217;s already have so many shortcodes like the post, taxonomy, slider, apply CSS properties. There is a problem it saves page content in the database. So there is need to make changes very care full. Always need to enable page revision.</p>
<p><a href="https://visualcomposer.io/" target="_blank" rel="noopener noreferrer"> More Info </a></p>
<h2>2. contact form 7 or gravity form</h2>
<p>Forms are common parts of the web application. Contact form 7 &amp; gravity form are two plugins that will helps the user in creating form. Contact Form 7 is a popular free plugin most of WordPress website use contact form 7. Gravity form has extra features due to these features it&#8217;s paid. In Both form plugin, you can integrate our custom HTML<br />
<a href="https://wordpress.org/plugins/contact-form-7/" target="_blank" rel="noopener noreferrer"> More Info </a><a href="https://www.gravityforms.com/" target="_blank" rel="noopener noreferrer"> More Info </a></p>
<h2>3. woocommerce</h2>
<p>E-commerce &amp; blog a normal requirement of client every client. WordPress already have blog functionality. But not have e-commerce functionality. So, for implement e-commerce, there is need to add another plugin. So, woocommerce is a plugin that enables e-commerce functionality. It&#8217;s very old plugin so it has a huge amount of support.</p>
<p><a href="https://wordpress.org/plugins/woocommerce/" target="_blank" rel="noopener noreferrer"> More Info </a></p>
<h2>4. Yoast SEO</h2>
<p>Once the website is complete then marketing of a website is very important. If the website can&#8217;t generate the revenue and customer then it&#8217;s not beneficial. For search engine optimization purpose on page optimization very important. It will help in SEO. Yoast SEO plugin which enables the SEO features on your WordPress project.</p>
<p><a href="https://wordpress.org/plugins/wordpress-seo/" target="_blank" rel="noopener noreferrer"> More Info </a></p>
<h2>5. Custom Post Type Maker<br />
<b></b></h2>
<p>When you start the custom application in WordPress then always a requirement of a custom post like a portfolio, team, etc. So &#8220;Custom Post Type Maker&#8221; plugin which helps to create custom post type &amp; taxonomy.</p>
<h2><a href="https://wordpress.org/plugins/custom-post-type-ui/" target="_blank" rel="noopener noreferrer"> More Info</a> <a href="https://wordpress.org/plugins/wck-custom-fields-and-custom-post-types-creator" target="_blank" rel="noopener noreferrer">More Info</a><br />
<b><br />
</b>6. advanced custom field</h2>
<p>It&#8217;s the plugin which extends you custom post functionality. With the help of them, you can create the meta fields, repeater fields. It provides an easy interface so that non-developer user can also extend the project functionality.<br />
<a href="https://wordpress.org/plugins/advanced-custom-fields/" target="_blank" rel="noopener noreferrer"> More Info </a></p>
<h2>7. Fast cache</h2>
<p>It will help in the performance of your WordPress project. It enables cache on your project so that most of the pages serve for the customer from the cache so, that your server or hosting resource become save. In short, you can get great performance with short of resources. If you can afford paid version then you can get the CDN &amp; database optimization &amp; cache features.</p>
<p><a href="https://wordpress.org/plugins/wp-fastest-cache/" target="_blank" rel="noopener noreferrer"> More Info</a></p>
<h2>8. wp security</h2>
<p>Once your website is ready &amp; running in live mode or real world then security is very important. If your website down for a day then it&#8217;s a retarded lot of revenue even left bad impressions on the visitors. wp security plugin which provides the various types of security like file security, database security, login lockdown session exploiting &amp; many more.</p>
<h2><a href="https://wordpress.org/plugins/all-in-one-wp-security-and-firewall/" target="_blank" rel="noopener noreferrer"> More Info</a><br />
<b><br />
</b>9. migrate DB</h2>
<p>It&#8217;s common plugin used by most of the developer&#8217;s because when you try to replicate current working website on our local then it provides you database according to your local URL. Mainly it helps in replacement of the URLs. So that you set up website locally faster.</p>
<p><a href="https://wordpress.org/plugins/wp-migrate-db/" target="_blank" rel="noopener noreferrer"> More Info</a></p>
<h2>10. qTranslate X or WPML</h2>
<p>If your website is multi-language then above both plugin great helps in translating. You can provide the translation for each language so that it will show the translated string for your user according to their locality.</p>
<p><a href="https://wordpress.org/plugins/qtranslate-x/" target="_blank" rel="noopener noreferrer"> More Info</a></p>
<h2>11. BuddyPress</h2>
<p>It helps to create networking website. Its provide a great feature of social networking website like activity, share, groups, pages &amp; create connections between each other. You can also extend their functionality by overriding theme or plugin.</p>
<p><a href="https://wordpress.org/plugins/buddypress/" target="_blank" rel="noopener noreferrer"> More Info</a></p>
<div style="clear: both; text-align: center;"></div>
</div>
<p>The post <a rel="nofollow" href="https://www.postnidea.com/top-10-wordpress-plugin-make-development-faster/">Top 10 WordPress plugin make development faster</a> appeared first on <a rel="nofollow" href="https://www.postnidea.com">Postnidea</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.postnidea.com/top-10-wordpress-plugin-make-development-faster/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>wp_editor implement using javascript on dynamic multiple textarea</title>
		<link>https://www.postnidea.com/wp_editor-implement-using-javascript-on-dynamic-multiple-textarea/</link>
					<comments>https://www.postnidea.com/wp_editor-implement-using-javascript-on-dynamic-multiple-textarea/#comments</comments>
		
		<dc:creator><![CDATA[Rakesh Kumar]]></dc:creator>
		<pubDate>Sat, 16 Sep 2017 12:28:00 +0000</pubDate>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wp_editor]]></category>
		<category><![CDATA[tinymce editor]]></category>
		<category><![CDATA[wpeditor implement]]></category>
		<guid isPermaLink="false"></guid>

					<description><![CDATA[<p>WordPress provide extendability in our functionality. Due to this developer have the flexibility to modify it according to client requirement. [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.postnidea.com/wp_editor-implement-using-javascript-on-dynamic-multiple-textarea/">wp_editor implement using javascript on dynamic multiple textarea</a> appeared first on <a rel="nofollow" href="https://www.postnidea.com">Postnidea</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div dir="ltr" style="text-align: left;">
<p>WordPress provide extendability in our functionality. Due to this developer have the flexibility to modify it according to client requirement. Sometimes if you want to provide good user interface using WordPress component like editor, media. A Very common using component is WordPress editor. Whenever developer has task to provide HTML formatted text area. In that situation developer always use existing component like wp_editor. Its good &amp; easily implemented. One advantage also there when the WordPress update same time it will also update.</p>
<p>You can easily apply the editor on the text editor using below example.</p>
<pre><code>&lt;textarea id="about_us"&gt;&lt;/textarea&gt;</code></pre>
<p>Add code in our plugin or functions.php</p>
<pre><code>
&lt;?php wp_editor( "loaded content", "place your editor id without #", "setting array"); ?&gt;
&lt;?php wp_editor( $content, $editor_id, $settings = array() ); ?&gt;
</code></pre>
<p>With the help of above code, you can populate the WordPress editor in the text area. But Its better for single and static textarea. But if you have multiple textarea then need to write to code for each textarea. So the code will increases. But the code review perspective code should be minimum for the requirement. It also fails when you have dynamic text area created using the jQuery. In that situation, it&#8217;s not loaded. So there is a need such an API that provides the generate the wp_editor using javascript.</p>
<p>Now for removing above issue WordPress release a new version of editor API. With the help of that, you load wp_editor using javascript. Due to this developer can load the editor using javascript. It&#8217;s very easy to load wp_editor on the text area with the usage of below steps.</p>
<p>First of all, need to enqueue the editor in the functions.php or plugin file like below</p>
<pre><code>
&lt;?php wp_enqueue_editor(); ?&gt;
</code></pre>
<p>It load the all js files related to wp_editor. Now you can load the editor in our js file where ever you want. New release provide the below functions.</p>
<pre><code>
    wp.editor.initialize();
    wp.editor.remove();
    wp.editor.getContent();
</code></pre>
<p>You can review code of new release and modify our js according to it.</p>
<div class="ast-oembed-container " style="height: 100%;">
<blockquote class="wp-embedded-content" data-secret="SVA0k3uwIp"><p><a href="https://make.wordpress.org/core/2017/05/23/addition-of-tinymce-to-the-text-widget/">Addition of TinyMCE to the Text Widget</a></p></blockquote>
<p><iframe title="&#8220;Addition of TinyMCE to the Text Widget&#8221; &#8212; Make WordPress Core" class="wp-embedded-content" sandbox="allow-scripts" security="restricted" style="position: absolute; clip: rect(1px, 1px, 1px, 1px);" src="https://make.wordpress.org/core/2017/05/23/addition-of-tinymce-to-the-text-widget/embed/#?secret=SVA0k3uwIp" data-secret="SVA0k3uwIp" width="600" height="338" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></div>
<div class="ast-oembed-container " style="height: 100%;">
<blockquote class="wp-embedded-content" data-secret="bP47Ps2DU9"><p><a href="https://make.wordpress.org/core/2017/05/20/editor-api-changes-in-4-8/">Editor API changes in 4.8</a></p></blockquote>
<p><iframe title="&#8220;Editor API changes in 4.8&#8221; &#8212; Make WordPress Core" class="wp-embedded-content" sandbox="allow-scripts" security="restricted" style="position: absolute; clip: rect(1px, 1px, 1px, 1px);" src="https://make.wordpress.org/core/2017/05/20/editor-api-changes-in-4-8/embed/#?secret=bP47Ps2DU9" data-secret="bP47Ps2DU9" width="600" height="338" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></div>
<p>(See wp-admin/js/editor.js for more info.)</p>
<p>Now the developer has more flexibility to add wp_editor on dynamically generated textarea. Due to this, you can create page builder like functionality. Due to this feature WordPress also add the editor in the widget section in the latest release.</p>
</div>
<p>The post <a rel="nofollow" href="https://www.postnidea.com/wp_editor-implement-using-javascript-on-dynamic-multiple-textarea/">wp_editor implement using javascript on dynamic multiple textarea</a> appeared first on <a rel="nofollow" href="https://www.postnidea.com">Postnidea</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.postnidea.com/wp_editor-implement-using-javascript-on-dynamic-multiple-textarea/feed/</wfw:commentRss>
			<slash:comments>24</slash:comments>
		
		
			</item>
		<item>
		<title>wordpress posts validation using ajax in backend</title>
		<link>https://www.postnidea.com/wordpress-posts-validation-using-ajax-in-backend/</link>
					<comments>https://www.postnidea.com/wordpress-posts-validation-using-ajax-in-backend/#respond</comments>
		
		<dc:creator><![CDATA[Rakesh Kumar]]></dc:creator>
		<pubDate>Tue, 01 Aug 2017 02:57:00 +0000</pubDate>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress contextual help]]></category>
		<category><![CDATA[wordpress plugin]]></category>
		<category><![CDATA[ajax validation]]></category>
		<category><![CDATA[post ajax validation]]></category>
		<category><![CDATA[wordpess post validation]]></category>
		<guid isPermaLink="false"></guid>

					<description><![CDATA[<p>In WordPress already so many hooks &#38; filter available with the help of that you can customize the wordpress according [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.postnidea.com/wordpress-posts-validation-using-ajax-in-backend/">wordpress posts validation using ajax in backend</a> appeared first on <a rel="nofollow" href="https://www.postnidea.com">Postnidea</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div dir="ltr" style="text-align: left;">
<p>In WordPress already so many hooks &amp; filter available with the help of that you can customize the wordpress according to our needs. But there are some customizations that are required more tricky solutions. For handling ajax request WordPress already define our rules &amp; standards but sometimes there is a need to performing ajax request on the default page saving. For the javascript WordPress uses js enqueue<br />
function with the help of you can attach javascript files &amp; functions. For creating ajax request action WordPress uses two below functions</p>
<p>When you calling the actions publically the use the below functions. There is no need requirement of the login.<br />
admin_post_nopriv_{action_name}<br />
If you want action to execute only when the user login.<br />
admin_post_{action_name}</p>
<p>If you want to call an action on login or without login then use both functions. Now I show you how to call the action in our Ajax request.<br />
http://your_host/admin-ajax.php<br />
On above URL you can pass the action: name using a post or get request then execution of the action occurs. But some problem comes due to customization then there is a need a tricky solution. You can see the below problem.</p>
<p>Problem:</p>
<p>We need to add some extra fields (custom fields) on WordPress backend page. When a user clicks on &#8220;publish&#8221; button then we call the API &amp; values fill with the response from the API then we submit WordPress page form. We implemented all but page always goes to Draft.</p>
<p>Solution:<br />
In a below code post status select box I have check if there is user select &#8220;Draft&#8221; I set the draft otherwise we put the status the publish so that we have to fix that problem. The above-explained things done by function &#8220;check_status&#8221;.</p>
<pre><code>
$("#publish:button").click(function(){
	$.get("url").done(function(data){
		if(check_status()){} else{
		$("#acf-field-region").after("");
		}

		$(document).find("#publish").prop("type", "submit");
		setTimeout(function(){

		$("#post").submit();

		},100);

		return false;
	})
	event.preventDefault();
});
</code></pre>
<pre><code>
function check_status(){
	var status=0;
	jQuery("#post_status option").each(function(){
		if(jQuery(this).val()=="publish"){
			status=1;
		}
	});
	return status;
}
</code></pre>
</div>
<p>The post <a rel="nofollow" href="https://www.postnidea.com/wordpress-posts-validation-using-ajax-in-backend/">wordpress posts validation using ajax in backend</a> appeared first on <a rel="nofollow" href="https://www.postnidea.com">Postnidea</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.postnidea.com/wordpress-posts-validation-using-ajax-in-backend/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Product documentation : with use of wordpress contextual help</title>
		<link>https://www.postnidea.com/product-documentation-with-use-of-wordpress-contextual-help/</link>
					<comments>https://www.postnidea.com/product-documentation-with-use-of-wordpress-contextual-help/#respond</comments>
		
		<dc:creator><![CDATA[Rakesh Kumar]]></dc:creator>
		<pubDate>Sun, 12 Feb 2017 16:51:00 +0000</pubDate>
				<category><![CDATA[Branding]]></category>
		<category><![CDATA[Presentation]]></category>
		<category><![CDATA[product documentation]]></category>
		<category><![CDATA[Products]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress contextual help]]></category>
		<category><![CDATA[wordpress plugin]]></category>
		<category><![CDATA[Plugin development]]></category>
		<category><![CDATA[WordPress contextual help]]></category>
		<guid isPermaLink="false"></guid>

					<description><![CDATA[<p>For any product, document ion is very important. When you develop a product then only you know how its work [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.postnidea.com/product-documentation-with-use-of-wordpress-contextual-help/">Product documentation : with use of wordpress contextual help</a> appeared first on <a rel="nofollow" href="https://www.postnidea.com">Postnidea</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div dir="ltr" style="text-align: left;">
<p>For any product, document ion is very important. When you develop a product then only you know how its work &amp; how to use. But if someone new person tries to use then he can&#8217;t use it so, in that case, your product useless for the user. So whenever you develop any product there is need to create a proper documentation. The documentation should cover below points.</p>
<h2>About product</h2>
<p>In this section describe our product completely like &#8220;about product&#8221;, &#8220;Why you made it&#8221;. If you develop something new product then there is no need to a comparison. If some product already exists then there is a need for comparison so that user can compare it. If a user uses an already product and your product have something new and better than user remve/uninstall our product &amp; try your, In that situation, if your product works better than user always use your product if he fails then he use our existing product. So there more important to include about a product, advantage, disadvantage last but not least comparison.</p>
<h2>How to use it</h2>
<p>It&#8217;s very important section so it&#8217;s documented very carefully. There is need to clarify more clearly so that user can easily understand. There is a need for more graphics &amp; text so that user have a clear idea. If your product is digital then nowadays different platforms like youtube, SlideShare, GitHub can help you. This platform provide you an area in which you show graphics, picture &amp; animation so that product user can easily understand &amp; use it.</p>
<h2>Reviews</h2>
<p>In this section provide the way (review submit form, toll-free number, or any number) through which user can provide the reviews. With the help of reviews, you can improve your product. Because mistakes make perfect so it&#8217;s more important.</p>
<p>I review many plugins of WordPress the author writes very good &amp; usable plugins but they fail only the documentation. Now WordPress provide a help section on top of the screen so take help of that you can provide help text &amp; animation on each page.</p>
<p>start with creating simple, so I write code for creating a plugin which is below</p>
<p>Now the plugin is created but only its shows in the plugin list now there is a need to links on sidebar menu so that user can move on the pages by clicking on that. Now below code add two menus in admin sidebar menu. The below menu also connected with function my_magic_function &amp; my_magic_function1.</p>
<p>Now Menu appears in the sidebar now on click on menu need to redirect on the page now I write a below code which creates the page on which user can redirect.</p>
<p>Now everything gone fine now the small plugin is ready but there is scanty of documentation now below code add the help text in above screen.</p>
<p>Now when you install this plugin in our wordpress set up then you can see the demo. I also attached the youtube video on which you also see the demo.</p>
<p><iframe src="https://www.youtube.com/embed/XFqWsHGMmJg?rel=0&amp;showinfo=0" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p>
<p>You can also browse the complete code by click on next button<br />
<a class="btn btn-primary btn-blue" href="https://github.com/postnidea/wordpress-Contextual-Help" target="_blank" rel="noopener noreferrer">code</a></p>
</div>
<p>The post <a rel="nofollow" href="https://www.postnidea.com/product-documentation-with-use-of-wordpress-contextual-help/">Product documentation : with use of wordpress contextual help</a> appeared first on <a rel="nofollow" href="https://www.postnidea.com">Postnidea</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.postnidea.com/product-documentation-with-use-of-wordpress-contextual-help/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>top ecommerce open source list : how to choose best one</title>
		<link>https://www.postnidea.com/top-ecommerce-open-source-list-how-to-choose-best-one/</link>
					<comments>https://www.postnidea.com/top-ecommerce-open-source-list-how-to-choose-best-one/#comments</comments>
		
		<dc:creator><![CDATA[Rakesh Kumar]]></dc:creator>
		<pubDate>Sat, 11 Feb 2017 16:22:00 +0000</pubDate>
				<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[prestashop]]></category>
		<category><![CDATA[woocommerce]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[Ecommerce]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://www.postnidea.com/top-ecommerce-open-source-list-how-to-choose-best-one/</guid>

					<description><![CDATA[<p>Nowadays e-commerce stores more popular because every seller wants a store. In e-commerce business scale not matter there is small [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.postnidea.com/top-ecommerce-open-source-list-how-to-choose-best-one/">top ecommerce open source list : how to choose best one</a> appeared first on <a rel="nofollow" href="https://www.postnidea.com">Postnidea</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div dir="ltr" style="text-align: left;">
<p style="text-align: justify;">Nowadays e-commerce stores more popular because every seller wants a store. In e-commerce business scale not matter there is small scale business or large scale business. I have seen in every ten customers 2 or 3 customer demand for the online store development. When such type requirement reaches the technical manager then he always thinks how to move towards the development weather develop store using core development or choose an any CMS like Magento, opencart, woocommerce, Magento, oscommerce, cscart, prestashop. If he moves using core development then there is required more time everything made from scratch and most of the time gone in testing. In other hand client started marketing so he wants our product as soon as possible in that case technical manager have pressure so, the only option left to choose any CMS so that I can be completed on time. You can&#8217;t choose any cms without any complete requirement so, before choosing any cms put out the below question towards the client.</p>
<ul>
<li>How many products you want to sell</li>
<li>you have an existing store and want to migrate it or want a fresh store.</li>
<li>If customer have existing store then evaluate their traffic</li>
<li>Try to collect inform regarding store built on which technology like any opensource or core. If it&#8217;s on open source then try to evaluate customization</li>
<li>existing store currently integrated with any android APP or any API</li>
<li>last but not least you want to launch your store on which type hosting is it shared hosting, dedicated hosting or dedicated server.</li>
</ul>
<p>After finding the answer you can review below information which can help you. I describe below important information regarding each CMS.</p>
<h2>Woocommerce</h2>
<p>The base of woo commerce is WordPress so it&#8217;s good for the less number of products. Also, it&#8217;s not more secure if want secure then there is need to add more security measure. It&#8217;s chocked out when a number of user &amp; their visits increases. But there is enhancement is easy because a lot of plugins available that can enhance the functionality. The default woocommerce  full fill most of the requirement but if still required then you can it. Wocoomerece follows class based structure &amp; easily override the template in your theme. Its working fine in all hosting because it handles small e-commerce business.</p>
<h2><b>Opencart</b></h2>
<p style="text-align: justify;">Opencart follows the MVC (model view controller) and another component also maintains language so that you can manage multiple languages just putting the separate files for each language. Its MVC based so there it&#8217;s easy to understand for every programmer. Its maintain the standard like view only contain represent part same model communication with the database so each query will be found in the model.</p>
<p style="text-align: justify;">controller work as routing &amp; execution. For enhancement, there is need programmer. But it&#8217;s more secure &amp; has a capacity to holds a number of products &amp; customers. It&#8217;s working fine with dedicated hosting or dedicated server. On shared hosting, it&#8217;s unable to handle more traffic So it&#8217;s required more resource but with that, it&#8217;s more secure &amp; handles more powerful.</p>
<h2><b>Oscommerce</b></h2>
<p style="text-align: justify;">It&#8217;s oldest e-commerce CMS so its follows core class &amp; function-based structure. It&#8217;s also good but its unable to handle a large number of products. When your products count goes greater than 1000 then its load slowly &amp; take a lot of time rendering data, so visitor can&#8217;t wait to move another one, in that case, you lose it business. Now there latest build they launched the cache version that can enhance but the previous version has the problem. So it&#8217;s also better for the medium scale business. There is one more thing it provides less amount of payment support for new payment &amp; delivery option need to integration.</p>
<h2><b>Prestashop</b></h2>
<p style="text-align: justify;">It&#8217;s used most like CakePHP structure. Its maintain the separate view section, class for database &amp; controller same as above controlling route. One most powerful feature is that it&#8217;s used cookies &amp; cache for maintaining the data on the visitor side. The Prestashop community also provides the module generator so that its easy for a developer for a cretae new module. It also provides most of the payment, delivery social integration inbuilt So there is no more requirement of development. It has a great capacity to handle near about 3000 products &amp; 50,000 customers without consuming a lot of resources. So it&#8217;s better.</p>
<h2><b>Magento</b></h2>
<p style="text-align: justify;">If I talk about the performance it has the same as PrestaShop but it&#8217;s required more resource. But if you used a dedicated server or hosting then it definitely works for you. It follows the Zend framework so there performance better previous one but the problem only is that it consume more resource. But its most powerful for large amount business it handles more number of user &amp; products.</p>
</div>
<p>The post <a rel="nofollow" href="https://www.postnidea.com/top-ecommerce-open-source-list-how-to-choose-best-one/">top ecommerce open source list : how to choose best one</a> appeared first on <a rel="nofollow" href="https://www.postnidea.com">Postnidea</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.postnidea.com/top-ecommerce-open-source-list-how-to-choose-best-one/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
