The following is from Azure Developer Training lab for AZ-203 Web Apps Overview Azure App Service web apps (or just Web Apps) is a service for hosting web applications, REST APIs, and mobile back ends. You can develop in your favorite language, be it .NET, .NET Core, Java, Ruby, Node.js, PHP, orPython. Applications run and […]
Revisiting Swift
Been several years since working with Swift. This is a refresher and some general notes, starting with the basics. This is focused on Swift v4. Playground – an Xcode project of a single file that can be executed. REPL – Read, Eval, Print, Loop; We can run the swift REPL by opening a terminal […]
AWS SAM (Serverless Application Model)
Following excerpt from AWS Developer site: The AWS Serverless Application Model (AWS SAM) is an open-source framework that you can use to build serverless applications on AWS. A serverless application is a combination of Lambda functions, event sources, and other resources that work together to perform tasks. Note that a serverless application is more than just a Lambda function—it […]
Facial Recognition using AWS Rokognition
Rekognition Overview This overview section was copied from AWS Rokognition site. Rekognition API service provides identification of objects, people, text, scenes, activities, or inappropriate content. Developers can quickly build a searchable content library to optimize media workflows, enrich recommendation engines by extracting text in images, or integrate secondary authentication into existing applications to enhance end-user […]
High Performance Computing Overview
These are some general notes regarding High Performance Computing (HPC). Purpose HPC focuses on solving problems where a single system might have difficulty completing it in a timely manner. Instead, more computing power is needed to solve such problems. HPC is not only about improving the system/hardware performance but also optimizations at the software level. […]
ARM vs Intel
Some notes on current state of ARM vs Intel processors. Background First ARM processors were manufactured in 1980s but not very popular. Their advantage was low power usage, which was not popular at that time. However in the 1990s, as portable devices found popularity and required low power processors the ARM popularity increased. Such […]
Azure Functions
This post is general notes and overview of Azure Functions. Background Azure Functions is the serverless compute service in Azure. It is a combination of Events and Code where events could be: Time Data Web In contrast to Azure Functions, we could use Azure App Service (Azure Web Applications and Web Jobs) but that […]
Azure hosted .NET web application
I needed a small application that manages attendance for a large people management / church management system known as RockRMS. We have this Rock system running in Azure hosted on a VM and using a SQL Database. There were some functionalities lacking in the Rock system and so I created this small extension application and deployed […]
Azure Securing Identity
The following is from Azure Administrator Training lab for AZ-103 Azure MFA Concepts Azure Multi-Factor Authentication (MFA) helps safeguard access to data andapplications while maintaining simplicity for users. It provides additionalsecurity by requiring a second form of authentication and delivers strongauthentication through a range of easy to use authentication methods. For organizations that need to […]
Azure Governance and Compliance
The following is from Azure Administrator Training lab for AZ-103 Management Groups If your organization has several subscriptions, you may need a way to efficiently manage access, policies, and compliance for those subscriptions.Azure management groups provide a level of scope above subscriptions. You organize subscriptions into containers called “management groups” and apply your governance conditions […]
Azure Active Directory
The following is from Azure Administrator Training lab for AZ-103 Azure Active Directory (Azure AD) is Microsoft’s multi-tenant cloud-baseddirectory and identity management service. For IT Admins, Azure ADprovides an affordable, easy to use solution to give employees and businesspartners single sign-on (SSO) access to thousands of cloud SaaS Applicationslike Office365, Salesforce.com, DropBox, and Concur. For […]
Azure Data Services
The following is from Azure Administrator Training lab for AZ-103 CDN Benefits A content delivery network (CDN) is a distributed network of servers that canefficiently deliver content to users. CDNs store cached content on edgeservers that are close to end-users. CDNs are typically used to deliver static content such as images, style sheets,documents, client-side scripts, […]
Azure Data Protection
The following is from Azure Administrator Training lab for AZ-103 Replication Options The data in your Azure storage account is always replicated to ensuredurability and high availability. Azure Storage replication copies your data sothat it is protected from planned and unplanned events ranging from transienthardware failures, network or power outages, massive natural disasters, andso on. […]
Azure Monitoring
The following is from Azure Administrator Training lab for AZ-103 Azure Monitor Service Monitoring is the act of collecting and analyzing data to determine theperformance, health, and availability of your business application and theresources that it depends on. An effective monitoring strategy helps youunderstand the detailed operation of the components of your application. Italso helps […]
Azure Network Traffic Management
The following is from Azure Administrator Training lab for AZ-103 System Routes Azure uses system routes to direct network traffic between virtual machines,on-premises networks, and the Internet. The following situations are managedby these system routes: Traffic between VMs in the same subnet. Between VMs in different subnets in the same virtual network. Data flow from […]
Azure Intersite Networking
The following is from Azure Administrator Training lab for AZ-103 VNet Peering VNet Peering Perhaps the simplest and quickest way to connect your VNets is to use VNetpeering. Virtual network peering enables you to seamlessly connect two Azurevirtual networks. Once peered, the virtual networks appear as one, forconnectivity purposes. There are two types of VNet […]
Azure Virtual Networking
The following is from Azure Administrator Training lab for AZ-103 Azure Networking Components A major incentive for adopting cloud solutions such as Azure is to enableinformation technology (IT) departments to move server resources to thecloud. This can save money and simplify operations by removing the need tomaintain expensive datacenters with uninterruptible power supplies,generators, multiple fail-safes, […]
Azure Storage In Depth
The following is from Azure Administrator Training lab for AZ-103 Azure Storage Azure Storage is Microsoft’s cloud storage solution for modern data storage scenarios. Azure Storage offers a massively scalable objectstore for data objects, a file system service for the cloud, a messaging store for reliable messaging, and a NoSQL store. Azure Storage is: Durable […]
Azure Storage
The following is from Azure Administrator Training lab for AZ-103 These are some reference notes using Azure Storage services as of 12/2018. The main storage services available are listed below and explained further in the sections below. Azure Blobs (objects/media) Azure Data Lake Storage (gen2) Azure Files (File Server) Azure Queues Azure Tables Azure Cosmos DB […]
Azure Security
The following is from Azure Administrator Training lab for AZ-103 Some Azure Services related to Security, Privacy and Compliance. Azure Firewall – enforce, log application and network connectivity. Inbound and oubound filtering rules. Azure Monitor loggin. Different than Web Application Firewall (WAF) which is part of Application Gateway – it does only inbound protection […]
Azure Resource Manager and ARM Templates
The following is from Azure Administrator Training lab for AZ-103 Resource Manager The infrastructure for your application is typically made up of manycomponents – maybe a virtual machine, storage account, and virtual network,or a web app, database, database server, and third-party services. You maynot see these components as separate entities, instead you see them as relatedand interdependent parts of a single entity. You want to deploy, manage, andmonitor them as a group. Azure Resource Manager enables you to work with the resources in yoursolution as a group. You can deploy, update, or delete all the resources foryour solution in a single, coordinated operation. You use a template fordeployment and that template can work for different environments such astesting, staging, and production. Resource Manager provides security,auditing, and tagging features to help you manage your resources afterdeployment. Consistent management layer Resource Manager provides a consistent management layer to perform tasksthrough Azure PowerShell, Azure CLI, Azure portal, REST API, and clientSDKs. All capabilities that are available in the Azure portal are alsoavailable through Azure PowerShell, Azure CLI, the Azure REST APIs, andclient SDKs. Functionality initially released through APIs will be representedin the portal within 180 days of initial release. Choose the tools and APIs that work best for you – they have the samecapability and provide consistent results. The following image shows how all the tools interact with the same AzureResource Manager API. The API passes requests to the Resource Managerservice, which authenticates and authorizes the requests. Resource Managerthen routes the requests to the appropriate resource providers. Benefits Resource Manager provides several benefits: You can deploy, manage, and monitor all the resources for your solutionas a group, rather than handling these resources individually. You can repeatedly deploy your solution throughout the developmentlifecycle and have confidence your resources are deployed in aconsistent state. You can manage your infrastructure through declarative templatesrather than scripts. You can define the dependencies between resources so they’re deployedin the correct order. You can apply access control to all services in your resource groupbecause Role-Based Access Control (RBAC) is natively integrated intothe management platform. You can apply tags to resources to logically organize all the resources inyour subscription. You can clarify your organization’s billing by viewing costs for a groupof resources sharing the same tag. Guidance The following suggestions help you take full advantage of Resource Managerwhen working with your solutions. Define and deploy your infrastructure through the declarative syntax inResource Manager templates, rather than through imperativecommands. Define all deployment and configuration steps in the template. Youshould have no manual steps for setting up your solution. Run imperative commands to manage your resources, such as to start orstop an app or machine. Arrange resources with the same lifecycle in a resource group. Use tagsfor all other organizing of resources. Terminology If you’re new to Azure Resource Manager (ARM), there are some terms youmight not be familiar with. resource – A manageable item that is available through Azure. Some common resources are a virtual machine, storage account, web app, database, and virtual network, but there are many more. resource group – A container that holds related resources for an Azure solution. The resource group can include all the resources for the solution, or only those resources that you want to manage as a group. You decide how you want to allocate resources to resource groups based on what makes the most sense for your organization. resource provider – A service that supplies the resources you can deploy and manage through Resource Manager. Each resource provider offers operations for working with the resources that are deployed. Some common resource providers are Microsoft.Compute, which supplies the virtual machine resource, Microsoft.Storage, which supplies the storage account resource, and Microsoft.Web, which supplies resources related to web apps. ARM template – A JavaScript Object Notation (JSON) file that defines one or more resources to deploy to a resource group. It also defines the dependencies between the deployed resources. The template can be used to deploy the resources consistently and repeatedly. declarative syntax – Syntax that lets you state “Here is what I intend to create” without having to write the sequence of programming commands to create it. The Resource Manager template is an example of declarative syntax. In the file, you define the properties for the infrastructure to deploy to Azure. Resource providers Each resource provider offers a set of resources and operations for working with an Azure service. For example, if you want to store keys and secrets, you work with the Microsoft.KeyVault resource provider. This resource provider offers a resource type called vaults for creating the key vault. The name of a resource type is in the format: {resource-provider}/{resource-type}. For example, the key vault type is Microsoft.KeyVault/vaults. ✔️ Before getting started with deploying your resources, you should gain an understanding of the available resource providers. Knowing the names of resource providers and resources helps you define resources you want to deploy to Azure. Also, you need to know the valid locations and API versions for each resource type. Resource Group Deployments Resources can be deployed to any new or existing resource group.Deployment of resources to a resource group becomes a job where you cantrack the template execution. If deployment fails, the output of the job can describe why the deployment failed. Whether the deployment is a single resource to a group or a template to a group, you can use the information to fix any errors and redeploy. Deployments are incremental; if a resource group contains two web apps and you decide to deploy a third, the existing web apps will not be removed. Currently, immutable deployments are not supported in a resource group. To implement an immutable deployment, you must create a new resource group. Resource Groups Resource Groups are at their simplest a logical collection of resources. There are a couple of small rules for resource groups. Resources can only exist in one resource group. Resource Groups cannot be renamed. Resource Groups can have resources of many different types […]
Azure Overview and App Service
Some general notes about the Azure cloud platform and services. Regions – geographical area with one or many datacenters Feature Availability – not all features available in every region Geography – discrete market area with one or more regions Availability Zones – physically separate locations within Region providing redundancy for that region Availability Sets – […]
AWS DAX Overview and Sample Application using Encryption At Rest
This is an overview with a sample application using AWS DAX – DynamoDB Accelerator. Further below is a sample application that uses DAX, DynamoDB and EC2 – all with encryption at rest. DAX is a fully managed, in-memory cache for DynamoDB. It reduces DynamoDB response times from milliseconds to microseconds. As with other AWS services, […]
Software Prototyping
Prototyping (or materialization) is a useful tool in developing new software applications. It helps identify and manage costs, key features and usage very early in the development life-cycle. Prototypes can be done in mock applications (not fully functional but contains some interactions) using various tools or even in traditional paper-and-pen. Perhaps not literally paper-and-pen but […]
Google App Scripts
Google App Script allows extensible functions to be created to work with G Suite products such as Docs, Sheets, Slides and Forms. It uses JavaScript as the language and can do things like: Add custom menus, dialogs, and sidebars to Google Docs, Sheets, and Forms. Write custom functions for Google Sheets. Publish web apps — either standalone or embedded in Google Sites. […]
.Net Core Services
This is a review of some of the core internals of the .Net Core Framework. Sample code can be found here: https://github.com/johnlee/dotnetcoreservices Background NET was first announced by Microsoft in 2000 and then evolved from there. The .NET Framework has been the primary .NET implementation produced by Microsoft during that nearly two decade period. […]
Networking Concepts
Revisiting some Networking concepts OSI Overview The Open Systems Interconnection model (OSI model) is a conceptual model that characterises and standardises the communication functions of a telecommunication or computing system without regard to its underlying internal structure and technology. Its goal is the interoperability of diverse communication systems with standard communication protocols. https://www.cloudflare.com/img/learning/ddos/what-is-a-ddos-attack/osi-model-7-layers.svg Physical Layer The physical layer is responsible for the transmission […]
Privilege Account Management
Privilege Account Management (PAM) is part of Identity and Access Management (IAM), or also known as Identity Management (IdM), where individual user rights to a resource are granted privileges so that they can execute certain tasks or procedures on that resource. This can also be part of Role Based Access Control (RBAC) in which the […]
Benchmarking AWS Databases
This was a quick app I created to run some basic tests against database services in AWS. It does basic read and writes using ADO.NET-ish frameworks. The dataset used is a 10 column varchar object called Item found in the mocks folder. The program can be run with different dataset sizes. Everything is configured through […]
Architectures
Some notes on the evolution of software architectures – past, present and future outlook. Often the way one does architecture design can be a combination of philosophy and the use of patterns, practices and principals. Any software architecture is an abstraction that should contain at least one or more of the following: Structure Layers Components […]
Building .Net Core apps in Docker with VSCode on Mac or Windows
We can develop applications inside Docker containers and completely decouple our host machine from any SDK or development environments. This means that when using frameworks such as .Net Core, we no longer need to have it installed or running on the host machine. Instead, we get the .Net Core SDK docker image and develop within […]
Kubernetes
Pronounced: kub-er-nate-es Kubernetes is an orchestrator for microservice apps using Docker containers. Kubernetes was created by Google, written by Go/Golang, and is one of the biggest open source infrastructure project. Google was running off containers far before Docker. To manage these, Google created in-house systems called Borg and Omega (proprietary), as the container management system. […]
.Net Core and Docker
These are some more notes about using .Net Core with Docker containers in a microservice architecture. A Docker container is just a process. It has a much smaller footprint than a virtual machine. VM includes the application, libraries, binaries and a full operating system. On the other hand, containers include the application and all libraries/binaries […]
.Net Core REST API
This is a reference document created for using .Net Core in RESTful services. Some common practices and concepts are discussed here along with a sample project below. The project is a basic web api with minimal services implemented. It was created to be used as a template for multiple RESTful service projects that were to […]
Serverless Application using AWS Lambda, API Gateway and DynamoDB and NodeJS
This is small sample project that demonstrates a Serverless Application. It uses the following AWS Services: API Gateway Lambda DynamoDB The repository of this project can be found on github here: https://github.com/johnlee/habits The application is used as a personal goal tracker. It stores daily attempts (with timestamps) and an overall score for the day. […]
.Net Core EF (Entity Framework v2.1)
This is an overview of EFCore 2.1 which contains many new features from EF6, such as lazy loading – which was not in EF Core until v2.1. EF Core Migrations EF Migrations We can run EF Migrations through Visual Studio in the PM console or through a plain command line console using […]
Docker Quick Reference
Some quick reference notes. Docker Command Examples // Run a docker images docker run -p 8080:3000 -v $(pwd):/var/www -w “/var/www” node npm start docker inspect mycontainer … C:\Projects\docker> docker run -it -p 8080:80 -v ${pwd}:/app -w “/app” microsoft/dotnet:2.1-sdk /bin/bash root@a00327ed64c0:/app# dotnet restore // Docker EXEC Interactive bash [lee@macbook:/c/project/]$ docker exec -it f3ce68 bash // […]
.Net Core CLI
Some reference notes on using the dotnet cli and .net core. Project templates can be created using the dotnet cli. As of v2.4.1 (sdk) the following are the template types. Note this can be seen with the ‘new’ command. lee@macbook:projects$ dotnet new Usage: new [options] Options: -h, –help Displays help for this command. -l, […]
Serverless App using AWS API, DynamoDB, Lambda, S3 and Visual Studio .Net
This is a sample project using Visual Studio 2017 (.Net 4.5 + Core 2) and the following AWS services: API Gateway DynamoDB Lambda S3 CloudFormation This project will have an Angular web front end hosted on S3, which calls APIs in the API Gateway. Those APIs are defined as Lambda functions and interact with DynamoDB […]
Microservices
Traditionally a single program would have multiple capabilities. When we scale that program, it would be replicating those bundles of capabilities. Microservices Architecture improves this by breaking the capabilities into individual programs. Each of these programs would run in its own container and therefore, when scaled, its much easier to pick and choose which capabilities […]
AWS Account Management
The following are covered in this post: Billing Organizations Resource Groups Tagging Active Directory Integration AWS Organizations AWS Organizations is an account management service that enables you to consolidate multiple AWS accounts into an organization that you create and centrally manage. It features consolidated billing. There is no additional charge for using Organizations. An […]
AWS CLI
The AWS Command Line Interface (AWS CLI) is an open source tool that enables you to interact with AWS services using commands in your command-line shell. The AWS CLI is available in two versions: Version 1.x – The generally available version of the AWS CLI that is suitable for use in production environments. Version 2.x – A […]
AWS Security and Monitoring
Topics covered in this post Shared Responsibility Model Risk and Compliance CloudWatch CloudTrail KMS Signature Version 4 Signing Process Trusted Advisor Config AWS has split responsibilities between them and users. Shared Responsibilities Model describes what customers of AWS need to follow. Customers / Users are responsible for patching, antivirus etc. It is recommended […]
AWS SQS SWF SNS and Kinesis
Notes here on the following services SQS SWF SNS Elastic Transcoder Kinesis SQS The oldest AWS service, first one to go public. Amazon Simple Queue Service (Amazon SQS) offers a secure, durable, and available hosted queue that lets you integrate and decouple distributed software systems and components. Amazon SQS offers common constructs such as dead-letter […]
AWS DevOps
Under a DevOps model, development and operations are no longer siloed. Sometimes, these two functions are merged into a single team where engineers work across the entire application lifecycle, from development and test to deployment to operations, and develop a range of skills not limited to a single function. Quality assurance and security teams may […]
AWS Lambda
AWS Lambda is a compute service that runs code without the developer having to manage the infrastructure which it runs on. The compute resources are automatically managed by AWS. The code is triggered to execute based on events, in other words the code runs on demand. AWS charges only for code execution time. AWS Lambda […]
Working with DynamoDB SDK API and .Net
In this post I’m doing a deep dive of AWS DynamoDB database and using the available APIs with .Net Core. For more general information on DynamoDB, refer to this post: http://solidfish.com/overview-of-aws-dynamodb/ The code shown here is from another post where I created a complete serverless web application in AWS using DynamoDB. Below is a […]
AWS EC2
EC2 is the backbone of AWS. Amazon Elastic Compute Cloud (Amazon EC2) provides scalable computing capacity in the Amazon Web Services (AWS) cloud. Using Amazon EC2 eliminates your need to invest in hardware up front, so you can develop and deploy applications faster. You can use Amazon EC2 to launch as many or as few […]
AWS Storage and Data Services
This article covers Storage services in AWS. EBS EC2 Instance Store EFS S3 S3 Glacier ElastiCache EMR CloudFront StorageGateway Import / Export Snowball / Snowmobile EBS Amazon Elastic Block Store (Amazon EBS) provides block level storage volumes for use with EC2 instances. EBS volumes behave like raw, unformatted block devices. You can mount these […]
AWS Databases
This article covers database services in AWS Elasticache RDS / Aurora RedShift DynamoDB EMR / Hadoop Which database service to use OLTP vs OLAP Online Transaction Processing (OLTP) differs from OLAP Online Analytic Processing (OLAP) in terms of the types of queries you will run. OLTP is like an order placed in a shopping app. […]
AWS CloudFormation
AWS CloudFormation is a service that helps you model and set up your Amazon Web Services resources so that you can spend less time managing those resources and more time focusing on your applications that run in AWS. You create a template that describes all the AWS resources that you want (like Amazon EC2 instances […]
AWS Identity and Access Management (IAM)
AWS Identity and Access Management (IAM) is a web service that helps you securely control access to AWS resources. You use IAM to control who is authenticated (signed in) and authorized (has permissions) to use resources. IAM is universal, not regional. All accounts start with a root account, it has complete Admin access. New users […]
DNS, Route53, CloudFront, WAF
DNS All computers on the internet, from your smart phone or laptop to the servers that serve content for massive retail websites, communicate with one another by using numbers. These numbers, known as IP addresses, are in one of the following formats: Internet Protocol version 4 (IPv4) format, such as 192.0.2.44 32 bits (8 […]
AWS API Gateway
Amazon API Gateway is an AWS service for creating, publishing, maintaining, monitoring, and securing REST, HTTP, and WebSocket APIs at any scale. API developers can create APIs that access AWS or other web services, as well as data stored in the AWS Cloud. As an API Gateway API developer, you can create APIs for use in […]
AWS VPC
Amazon Virtual Private Cloud (Amazon VPC) enables you to launch AWS resources into a virtual network that you’ve defined. This virtual network closely resembles a traditional network that you’d operate in your own data center, with the benefits of using the scalable infrastructure of AWS. The following are the key concepts for VPCs: A virtual […]
OSX Application Development
Applications There are four types of applications. Native Java based Unix based X Window Systems (libraries available from XQuartz) Application development can be done using Carbon (deprecated pre OSX) Cocoa Java (Java 6 used for OSX 10.7 – 10.11) COTS Applications can be downloaded from Apple Store Requires Apple ID iCloud – syncing with all […]
Angular and HTTP Requests (v4.3+)
In Angular2 the HTTP requests were done using the HTTP module. This module was missing some of the features and so in Angular4 there was a new set of APIs for HTTP requests. This was in the HTTP Request Client module. As of Angular5, the HTTP module (from Angular2) has been deprecated and so developers […]
Angular CLI Revisited
The Angular CLI can be used to create and setup Angular projects. It follows best practices and utilizes conventions to make the project easily understandable and maintainable. To start, install the Angular CLI through NPM. npm install -g @angular/cli Once installed we call the CLI using the “ng” command. Create a new app as so. […]
Artificial Intelligence
First part of this post is from the book listed below. The second part of this post are random notes relates to Artificial Intelligence. Some notes are more fictional… Artificial Intelligence Life 3.0 Max Tegmark; 2017 MIT / RIT Cosmologist / Physicist Synopsis These are some notes I’ve taken while reading Max Tegmark’s book […]
Blockchain and Cryptocurrency
Some notes in areas of cryptocurrency. Blockchain Blockchain is a linked list of blocks where each block contains some information. (Also known as Distributed Ledger Technology DLT). The lists are linked in chronological order and stored in a distributed system. The list grows during transactions in which a new block is added. Older blocks on […]
Webpack
Webpack is a packaging tool used to create modular bundles for JavaScript, CSS and HTML. Though this is it’s main feature, there are many other features of webpack as well – such as being a task runner and even acting as a dev server. By the use of a dependency graph, it maps out the […]
Using Visual Studio with Webpack for Angular Development
Introduction With the release of Angular 2 and ASP.NET Core in 2016, the two technologies have become a common pair for .Net web developers. The .NET Core’s platform agnostic ability has made it more appealing even for the non .Net developers. Moreover, Microsoft has been pushing hard to reach this outside market and introduced Visual […]
Angular AOT Compilation and Lazy Loading
Lazy loading is about controlling when modules or components get loaded. Lazy loading only loads objects when directed to. This is controlled through the routing engine with the “loadChildren” property and the path to the module being lazy loaded. { path: ’employees’ loadChildren: ‘app/employees/employees.module#EmployeeModule’ } Note that the module’s name is specifically called out in […]
Angular Unit Testing
The unit test framework in Angular is called Jasmine. Jasmine is what creates the tests. These tests are then run in another framework called Karma. When using Angular CLI, a unit test can be created by running ng generate service testable Generally the convention for unit test file names are component.service.ts component.service.spec.ts. The test class […]
Angular Component Communication
Note: material below were from Angular course by Deborah Kurata (see link below). Below are my notes and her charts taken from that course. Some situations where commuication takes place in an Angular application: Component to Template (Child Components) View updates React to user event Perform a task Check form or control state Component to […]
Angular Forms
Template Driven Forms To use template driven forms, make sure that FormsModule is imported from @angular/forms. This can be brought in at the app.module level if needed throughout the application. <h3>Position</h3> <form #form=”ngForm”> <input name=”title” ngModel> <div> <button type=”submit”>Submit</button> </div> </form> {{ form.value | json }} In the last line above, the form.value is processed […]
Angular Animations
To use Angular animations, it must be installed from NPM. @angular/animations It is then imported in the AppModule as import { BrowserAnimationsModule } from ‘@angular/platform-browser/animations’; The animations can now be called inside any component. It is defined inside the component’s decorator underneath the “animations” property. import { Component } from ‘@angular/core’; import { trigger,state,style,transition,animate,keyframes } […]
Angular Directives and Pipes
Directives are attributes that are placed inside DOM elements or inside of a component. For example: <app-org-chart myDirective></app-org-chart> A class is declared as a directive by using the @Directive decorator. The selector is usually set as “[appDefault]”. A directive (or any class) can access the DOM by using the ElementRef service. This needs to be […]
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 […]
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 } […]
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 […]
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 […]
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 […]
Using Angular2, Webpack and Visual Studio 2015
Most articles out there about Angular2 with .Net use .NET Core and Visual Studio Code as the IDE (with node serving behind it). For the few of us procrastinators who haven’t moved on to the latest, its difficult to find examples and documentation on using Angular2+ with old .Net 4.5+. Full blog post about this […]
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 […]
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 […]
ASP.NET Core, Angular2 on Azure using OAuth
This is a simple app that is hosted on Azure. It uses ASP.NET Core with Angular2 front end and WebAPI on the back. The site and database are hosted on Azure and use Azure’s EasyAuth (link tbd) authentication service. This service allows for user login using their Microsoft, Google or Facebook accounts. The app has […]
.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 […]
Introduction to ASP.NET Core
ASP NET Core Released June 2016 Build on .Net core Cross Platform Not tied to .Net framework Unification of MVC and Web API Dependency Injection is core feature (no third party) Modular HTTP Request pipeline Based on NuGet � everything is package Cloud ready IIS or self-host Open Source Problems with ASP NET MVC Dependency […]
Feature Release Management using Pipelines
This covers best practices in managing feature releases in TFS / Visual Studio and using Azure. Release Pipelines and Management Build once and have it deploy to multiple environments. The concept is to de-couple the build from deploy. The deploy is a pipeline, from dev to int to stage to prod. In between these […]
Managing and Deploying SQL Database Code
SQL Server Data Tools (SSDT) Does database comparisons, deployments, automation In Visual Studio SQL Server Project Being in Visual Studio � can do smart refactoring. It propagates all the changes (like a rename) to all associated files. Schema Compare and Updates Changes made on the SQL server can be brought back into Visual Studio through […]
Darwinism, Creationism, Intelligent Design and Theistic Evolution
Book Notes The Language of God Francis Collins; 2006 Evolution and the Science of Creation Bill Nye; 2014 Synopsis These books speak on the topic of Religion vs Science and how it plays into our beliefs of evolution and faith. The books have some contrasting views but not completely opposites. Bill Nye relates more […]
DevOps integration with Team Foundation Server
DevOps Dev + Ops = Delivery and support of software Dev and Ops work closely together Use of automation Build Test Deploy MonitoringInfrastructure (like use of containers / docker)Frequent ReleasesQuick testing Creates predictability and consistency (a delivery every 30 days) Define what DONE means Works in smaller chunks prioritizes the backlog TFS and Team […]
Working with Integration Tests
This is a sample project demonstrating integration tests that include the Data Access Layer (DAL). This is using .Net Entity Framework version 6 and Microsoft’s MSTEST. See other blog posts regarding integration testing and unit testing here: http://solidfish.com/unit-testing-vs-integration-testing/ http://solidfish.com/unit-testing-with-dependency-injection/ This example uses database migrations as part of the tests. It drops and recreates the […]
Database Access from IIS Best Practices
This document reviews techniques and best practices in securing connections between a web application server and database system. This document focuses on .Net based web applications running on IIS and connecting to a MS SQL Server database. It assumes the web application is accessible to an intranet or internet. This document references IIS7.5+, Windows Server […]
Windows App using Prism 6
Its been a while since I’ve last made a windows app. Last time I did it was using WinForms on .Net3. Recently I got a project to develop a native windows 10 app. This is not through the app store – but rather using WPF. I created this sample app to play with WPF, use […]
Enterprise Authentication
These are some notes on how authentication can be done in an enterprise. This all falls under Identity and Access Management. Some ways of doing identity verification: Direct Authentication – app maintains user identity information Username / Password Smart cards Biometrics Federated Third-party authentication – SAML/OAuth Some ways of using identity: AuthN AuthZ Identity Delgation […]
Overview of ES6 Javascript 2015
Sample source code files available here on github https://github.com/johnlee/es6 ECMAScript 2015 / ES6 Updated version from ES5 (2005 version). Released 2015. Supported by almost all major browsers. Some of the new features are: Syntax Modules and Classes Types and Object Extensions Iterators, Generators and Promises Arrays and Collections Reflect API Proxy API To see […]
Cybersecurity and Cyberwar
Book Notes Cybersecurity and Cyberwar P.W. Singer and Allan Friedman; 2014 Synopsis A non technical overview of cybersecurity starting with its definition and importance in today’s cyber world. It reviews some of the vulnerable areas of attack, methods of attack, and the lasting consequences of an attack. The book then covers some aspects of […]
Heroes of the Computer Revolution
Book Notes Hackers: Heroes of the Computer Revolution Steven Levey; 25th Anniversary edition; Published 2010 (1st edition was 1984) Synopsis The book covers some of the influential people and computers during the early computer revolution – from the mainframes of the 1950s to the first home computers of the 1970s and 1980s. The book […]
Using Azure to Manage Connection Strings
Azure provides a variety of application settings that can help manage the app from within Azure instead of coding it in the application. Some of these settings are highlighted below. Application Settings tbd Connection Strings Azure provides connection strings that can be configured for the whole app. This includes ASP.NET based apps as well as […]
ASP.NET MVC, WEBAPI, SQL, Unit Test and EF on Azure
This is a sample project that contains the following: ASP.NET MVC (4.6) ASP.NET WEBAPI SQL (SQL SERVER 2014) ENTITY FRAMEWORK (5) UNIT TESTS All is deployed on Azure here: http://samplewidgets.azurewebsites.net/ This is a project I use as kind of a template for other projects that use similar technologies and frameworks. I’ve also used it to […]
Material Design
Material Design is a concept created by Google and published around 2014. It extends the ‘flat design’ concept by creating layers (moving along the Z-axis). This includes methods of shadowing as well as various animations for components that users interact with. Each of the layers represent a ‘material’ that reacts differently to light (thereby giving […]
Web Imaging Formats
File Formats The most commonly found image file formats are: BMP Not supported everywhere Not compressed GIF Supports animation 8bit color (256 color) Supports Transparency (non alpha) Lossless Compression Does not loose resolution PNG Supports Alpha Transparency Gaining popularity for photos Does not loose as much resolution JPG Supports Compression Not scalable (looses resolution) Lossy […]
UI / UX Design Fundamentals
Notes taken during CodeSchool course: Fundamentals of Design All pictures are property of CodeSchool Typography Some fonts are just horrible. Invest in researching which fonts match your content and audience. Content should be both verbal and visual, depending on what needs to be presented. Typefaces Humanist Serif = good for journalistic content Sans Serif does […]
Web Performance Optimization (WPO)
This was a presentation used to introduce concepts in Web Performance Optimization.
Introduction to AngularJS
This is Angular Version 1 Introduction course to AngularJS (v1) from MVA. @section scripts{ <script src=”~/Scripts/angular.js”></script> <script src=”~/Scripts/angular-route.js”></script> <script src=”~/Scripts/angular-resource.js”></script> <script src=”~/Scripts/angular-animate.js”></script> <script src=”~/Client/Scripts/AtTheMovies.js”></script> <script src=”~/Client/Scripts/MovieService.js”></script> <script src=”~/Client/Scripts/ListController.js”></script> <script src=”~/Client/Scripts/DetailsController.js”></script> <script src=”~/Client/Scripts/EditController.js”></script> } <h1>At the movies</h1> <div data-ng-app> {{true ? “true” : “false”}} </div> Module = is an abstraction that allows you to […]
DOM Notes
Some quick reference notes on Document Object Model Created by the browser when a web page is loaded. It is an object model representing the HTML DOM is an object oriented representation of a web page It is hierarchical – based on the element tags <head>, <body> at top / root DOM is most commonly […]
JavaScript Best Practices
Ternary Conditionals var x = true ? true : false; Nested Ternaries isArthur && isKing ? (weapon = ‘a, helment = ‘a) : isArcher ? (weapon = ‘b’, helmet = ‘b’) : (weapon = ‘c’, helmet = ‘c’); Logical Assignments Var result = 42 || undefined; // 42 Var result2 = [‘sweet’] || […]
Unit Testing vs Integration Testing
Unit Tests tests a single class focuses on single behavior or function it drives implementation runs in memory (using mocks) Integration Tests tests a system (more whole than unit test) focuses on interaction between functions catches regressions (in future changes) runs in database (uses data access layer) Due to integration tests being focused on the […]