Posts

Showing posts from May, 2018

ngFor in Angular2

Image
Hey...!! It's been a while since I posted my last article in CodeCircle. In web development,when fetching data from the database we use for loops basically.Use of  for loops can be easily done using *ngFor in AngularJS. Lets see how we can easily use this in implementation. Set up your Angular environment as we did in previous articles. Now lets try simple examples to get aclear idea of using *ngFor. Example 1 :Print Set of fruits  Define an array of fruits in your app.components.ts file as below. import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { public fruits = ['Apple', 'Grapes', 'Lemon', 'Oranges', 'Papaw']; } Now write the code for the *ngFor in your app.components.html file. <p *ngFor="let item of this.fruits">{{item}}</p> Outpu

SQL JOINS

Image
If you are familiar with SQL, you might have written queries to fetch data using a single table. But SQL joins are used to fetch data from two or more tables. This can be considered as one of the most benefited features enable in SQL. Lets see how we can use SQL joins to fetch data . Rather than storing the same data in multiple tables,by using this method one table will keep a reference to a ID of the other table. This approach is more efficient  and lets see we can do this using SQL joins. Types of Joins In MySql we can see there are mainly three joins , INNER JOIN LEFT JOIN RIGHT JOIN 01. INNER JOINS In INNER JOIN,  the query selects all the rows from both tables where there is a match between the columns in both tables. SQL Query SELECT column_name(s) FROM table1 INNER JOIN table2 ON table1.column_name=table2.column_name; Here the INNER JOIN is Specified by the ON keyword which is in the syntax. Example : Lets see How the INNER

Microservice Architecture

Image
Microservice Architecture or simply Microservices, an emerging technology grown popular in recent years which is used in software development.The article will help you to get to know about Micro Services. This architecture is helpful for the deployment of large complex applications also support for range of platforms and devices like web,android,Internet of Things and wearables .  The large complex applications are deployed into small modules which runs separately as unique processes.So basically using Microservices you can easily use any of the technologies as the development is done separately as a module.  The communication among the modules are done considering the requirements of the business goal. Here HTTP/REST with JSON is mostly used. Examples  Netflix eBay Amazon Twitter PayPal Soundcloud   and many of the other applications have now moved to microservices from Monolithic Architecture where they have decomposed their business logic into small unit as mo