Hello World!

Welcome to my site. I use this site as a repository to dump knowledge I come across, generally in the areas of software engineering and information technologies, but may include other miscellaneous tidbits. Most of the posts are written as notes for my personal reference.

 

if i.hear then
i.forget
if i.see then
i.remember
if i.do then
i.understand

Latest articles

Angular Routing and Navigation

Client-side routing (all done on the client through angular’s routing engine). The index.html must have the <base> element <!doctype html> <html> <head> <metacharset=”utf-8″> <title>Myquickstart</title> <base href=”/”> <metaname=”viewport”content=”width=device-width, initial-scale=1″> <linkrel=”icon”type=”image/x-icon”href=”favicon.ico”> </head> <body> <app-root>Loading…</app-root> </body> </html> The <base> element is recognized by the router and instructs how to compose navigation URLs. The app.module.ts file must have the […]

Read article : Angular Routing and Navigation

Angular with RxJS

The HttpModule is Angular’s built-in module for working with HTTP requests/responses. This needs to be imported in the module that will contain the service making the calls. import { BrowserModule } from ‘@angular/platform-browser’; import { NgModule } from ‘@angular/core’; import { FormsModule } from ‘@angular/forms’; import { HttpModule } from ‘@angular/http’; import { AppComponent } […]

Read article : Angular with RxJS

Angular Services and Providers

We provide services so that the dependency injection can inject them when needed. By best practice, we name services to be provided with the word “Service”, ex SalaryService. A service is simply a class. Note that services have the “@Injectable” decorator. import { Injectable } from ‘@angular/core’; @Injectable() export class SalaryService { getSalaries() { return […]

Read article : Angular Services and Providers

Angular Components

Components contain metadata at the top and exported classed on the bottom. Example: @Component({   selector: ‘app-root’,   template: ‘<app-position></app-position>’,   styleUrls: [‘./app.component.css’] }) export class AppComponent {   private jobPosition = “CEO”;   hidePosition = false;   getData() {     return this.jobPosition;   } } Selectors The selector defines how a component is added […]

Read article : Angular Components

Angular Modules

A module is the bucket that contains the basic building blocks (components, services, etc) of an angular application. Every Angular application must have at least one module. Best practice says we define this as app.module. A module has the following key items defined within it. Declarations – list of components/directives/pipes that included in this module […]

Read article : Angular Modules

Reactive Programming using RxJS

Reactive Programming Paradigm Asynchronous programming Works with Functional Programming ReactiveX works with many languages JS .Net Java   More information: http://reactivex.io/intro.html   Mission Statement ReactiveX observable model allows you to treat streams of asynchronous events with the same sort simple, composable operations that you use for collections of data items like arrays. It frees you […]

Read article : Reactive Programming using RxJS

The Science of Energy

Course Notes Lecture Series by Michael Wysession, Ph.D. Professor of Earth and Planetary Sciences Washington University   Energy and Human Civilization The human demand for energy is increasing. There are many different energy sources, though no single solution on which is best. There is a cost and benefit for all energy resources. Energy affects the […]

Read article : The Science of Energy

.Net Core Dependency Injection

Dependency Injection (DI) is software design pattern that decouples (or loosely couples) components in an application. It is based on the Dependency Inversion Principle (DIP) which is part of a greater design principle of Inversion of Control (IOC). The components of an application, whether it be classes or modules, are instantiated at run-time – which […]

Read article : .Net Core Dependency Injection