Posts

Angular: Architecture overview and concepts

The first big change in Angular over AngularJs is Components. Components replace the Controllers of AngularJs. But that is where the similarity ends. Angular Components do not look like Controllers. The Components are actually similar to the directives of AngularJs. Angular Architecture The architecture of an Angular Application is based on the idea of Components. An Angular application starts with a Top-level component called Root Component. We then add child components forming a tree of loosely coupled components. Angular Modules The Angular provides a nice way to organize Components, Services, Directives by using the concept called Angular Modules. Special directives are used to create the Modules. The Angular Module is also called ngModule. Use Angular Module (or ngModule) to organize all the Angular code within a bigger Angular Application. The Application is made up of several Angular Modules acting toge

Angular: Creating new project

Image
What is Angular CLI The Angular CLI helps us to quickly create an Angular application with all the configuration files and packages in one single command. It also helps us to add features (components, directives, services, etc) to existing Angular applications. The Angular CLI creates the Angular Application and uses: Typescript, Webpack ( for Module bundling), Karma ( for unit testing), Protractor ( for an end-to-end testing). How to Create a new Angular project Before starting with Angular, you need to set up your developer environment and install the required tools. Before going further install the following: Visual Studio Code (or any other editor of your choice) NPM Package Manager Installing Angular CLI The first step is to install the Angular CLI. We use the npm install command. npm install -g @angular/cli@latest The above command installs the latest version

Angular: Bootstrapping in angular

Image
What is Bootstrapping? Bootstrapping is a technique of initializing or loading our Angular application. Let’s walk through the code created in "Create your First new Angular project" and see what happens at each stage and how our AppComponent gets loaded and displays “app works!”. Angular takes the following steps to load our first view: Index.html loads: The initial HTML file is loaded into the browser. Angular, Third-party libraries & Application loads: Angular framework and any third-party libraries are loaded. Main.ts - the application entry point: The main.ts file is executed, which bootstraps the Angular application. Root Module: The root module ( AppModule ) is loaded. This module organizes the application code and defines the components, services, and other features used in the application. Root Component: The root component ( AppComponent ) is loaded. This component serves as the starting point of the application and is defin

Angular: angular component

Image
What is an Angular Component The Component is the main building block of an Angular Application. The component contains the data & user interaction logic that defines how the View looks and behaves. A view in Angular refers to a template (HTML). The Angular Components are plain JavaScript classes and defined using @Component Decorator. This Decorator provides the component with the View to display & Metadata about the class The Component is responsible to provide the data to the view. The Angular does this by using data binding to get the data from the Component to the View. This is done using the special HTML markup knows as the Angular Template Syntax. The Component can also get notified when the View Changes. The Angular applications will have lots of components. Each component handles a small part of UI. These components work together to produce the complete user interface of the application The Components consist of three

Angular: Data binding

What is Angular Data Binding Data binding is a technique, where the data stays in sync between the component and the view. Whenever the user updates the data in the view, Angular updates the component. When the component gets new data, Angular updates the view. There are many uses of data binding. You can show models to the user, dynamically change element style, respond to user events, etc. Data Binding in Angular The data binding in Angular can be broadly classified into two groups: One-way binding Two-way binding One-way binding In one-way binding data flows from one direction. Either from view to component or from component to view. From Component to View To bind data from component to view, we make use of Interpolation & Property Binding. Interpolation Interpolation allows us to include expressions as part of any string literal, whi

CardHolder - business card storage application

Image
Problem      Throughout my career, I met many professionals in their respective fields and exchange a few words, and obtained their business cards as well. I used to store them in my cardholder or simply in my cupboard but it was quite frustrating to find a specific business card of someone when you need their services. moreover, there was quite some more annoying situation where I was not at home and don't have any business card at my reach but badly need to contact someone to reach out for their services so bearing in mind that modern problem requires modern solution I decided to create my own application which will solve the issue to store, search and carry all those business cards around. Solution my first solution was to download an already existing application, but some were paid application some were freemium and all of them did not have the specific feature that I want to use in my day to day basis  I started creating prototypes using two Xamarin which is a cross-platform d

My experience with Azure DevOps

Image
What is Azure DevOps Azure DevOps is formerly known as Visual Studio Team Services (VSTS). Basically is it a set of practices intended to reduce the time between committing a change to a system and the change being placed into normal production or even development environment, while ensuring high quality. Tools available to use with Azure DevOps It is a good news for a developer to know that they can use their favorite tools with Azure DevOps with any compromise. You can connect many tools with Azure  DevOps  to ensure productivity while doing your work Below is a small list of tools that can be connected with Azure  DevOps. Why use Azure DevOps There are several reasons to choose Azure DevOps but the following are the main and most important one. First of all Azure DevOps offers a high performance deployment are more frequent with less failure and the fact that it is fast recovery as well in case of failure. Moreover with organisation adopting Azure DevOps they tend to have a lean man

Asymmetric cryptography using Angular 9 and Asp.net Web Api

Image
Introduction Nothing better than to learn something new during our free time. A new programming language, why not. Thus to make my mind busy as a geek i tried to learn Angular 9 and create a small application nothing fancy at all and called it Asymmetric cryptography. In simple words using Angular 9 to create the client side application and hooked it up with an ASP.NET web api. To conclude i deployed the application on Microsoft azure. How it works Key generation Asymmetric cryptography uses 2 key pairs to encryption  and decryption data. The 2 keys consist of a private key and a public key. To produce a cipher text (encryption), the public key alongside with the plain text will be used. In the same way, in order to produce a plain text (decryption) the cipher text will be used with the private key. The images below illustrate how asymmetric cryptography works: To use the application first select the key length namely: 512 bit 1024 bit 2048 bit 4096 bit