Posts

Difference between Angularjs, angular2, 4 and 5

Angular Js AngularJs  is a javascript framework developed by Google  to develop a dynamic web application. AngularJS fully depends on HTML and JavaScript so there is no need to learn other languages. There are some things that make Angular so good for programmers. Two-way data  bindings Controllers Expressions , which bind data to HTML Attaching new behavior to DOM elements, such as DOM event handling. Grouping of HTML into reusable components. Excellent tools and support from the Google community Google has released the latest version of its JavaScript framework is AngularJS 5 Along with many new features, Below we see some basic difference or new features in angular 2, 4 and 5. Angular 2 Angular 2 comes with everything you need to build a complicated frontend web or mobile apps, form handling, data management, HTTP services, and so much more.  With a rising popularity and more and more features coming to the core, the Angular team decided to r...

Linked List in Python

Hi Floks, In Python linked list , eg : class node:     def __init__(self,initdata):         self.data = initdata         self.next = None     def getData(self):         return self.data     def getNext(self):         return self.next     def setData(self,newdata):         self.data = newdata     def setNext(self,newnext):         self.next = newnext

Abstract Factory

Definition: Provide the interface for creating families of related or dependent objects without specifying their concrete classes. For eg: function Employee (name){       this.name = name;    this.say = function (){                  log.add("I am employee "+ name);    }; } function EmployeeFactory(){     this.create  = function(name){         return new Employee(name);     }; } var log = (function (){   var log = "";          return {              add: function (msg){ log += msg+ "\n"}              show : function (){console.log(log); log = ""}    } })(); function run(){   ...

JavaScript Split

Hi Folks, Split in javascript eg: var str = "hi good morning"; var res = str.split(" ");
Hi Folks, Object literal notation Object literal notation, which we also cover in the Module pattern section, can be thought of as an object containing a collection of key-value pairs with a colon separating each pair of keys and values, where keys can also represent new namespaces. eg: var appMyapp = {}; appMyapp.foo = function(){ return "bar"; } appMyapp.utills = fuction(){ toString:function(){ }, }
Hi Folks, Prefix Namespacing in Javascript. One solution to the above problem, as mentioned by  Peter Michaux , is to use prefix namespacing. It’s a simple concept at heart, but the idea is we select a unique prefix namespace we wish to use (in this example,  myApplication_ ) and then define any methods, variables, or other objects after the prefix as follows: var myapplication_property1 = {}; var myapplication_property2 = {}; function myapplication_method(){ //..... }
Hi Folks, Namespacing in Javascript Single Global Variable: One popular pattern for namespacing in JavaScript is opting for a single global variable as our primary object of reference. A skeleton implementation of this where we return an object with functions and properties can be found below: var myApp = (function () {       function(){        //......       }, return{       //......       } })