Jun 10, 2017

Angular Ngcomponent

Last week I explained what was the NgModule in angular, we saw what were the parameters we could add and what those parameters could be composed of. Today I would like to talk about another main piece of Angular, the Component. We will see what argument it takes and how we can use it.

Angular

Jun 03, 2017

Angular Ngmodule

The first time I saw the NgModule decorator and its arguments I was completely lost. I couldn’t understand what was the meaning of imports, declarations, exports, providers or bootstrap and I had a hard time finding clear explanations. So today I will go through each attributes and provide an explanation together with an example to understand what is the role of each NgModule argument.

Angular

May 26, 2017

Entity Framework Core Sqlite

Entity Framework is a framework abstracting away all the complexity of dealing with storage. This abstraction is also known as ORM ~ object-relational mapping. There is a number of provider which are implementation of the storage like SQL server or MySql or also SQLite, the one we will be seeing in this post. SQLite is a embedded database. The whole database is contained within a single .db file which makes it highly portable, so portable that it is the default database installed in mobile OS like iOS and Android. It is extremely easy to use and to maintain. It also offer a powerful implementation of SQL. Today we will see how we can make use of Entity Framework with SQLite provider in a ASP.NET Core application.

DotNetCore CSharp

May 19, 2017

Aspnetcore Razor And Tag Helpers

Razor is a HTML templating engine which allows us to construct HTML pages from a combination of data and HTML markup. The power of Razor resides in its typesafety and support for well known operators, conditional if else and iterators for while foreach. It allows us to directly use our C# models in the templates and call functions accessible by the view. Together with intellisense, it is quick way to build UI. Today we will explore some of the features from Razor.

DotNetCore CSharp

May 10, 2017

Aspnetcore Route Attribute

Attribute route in ASP NET Core is an easy way to define URL routes for Web API projects. There can be instance where it gets confusing because of all the options provided. Today we will see the meaning of the different options and how they affect the constructed route. This post will be composed by 3 parts:

DotNetCore CSharp

May 05, 2017

Opinions Decisions Be A Successful Team Mate

I have been working for more than 8 years in the software industry and have dealt with loads of developers from junior to senior. There are multiple points which can make a successful team mate. One of them is knowing when to have opinions and when to take decisions. One thing I have learnt is that decisions, forcefully agreed on, will most likely not be respected by the team. I also learnt that decisions come from opinions and the way we express opinions will dictate the level of respect team mates attributes to you and the level of trust they place in you. Just like in sport, respect and trust are the most important values to have. Today I would like to explore the different scenarios where we, as developer, should express our opinions and also when should we, as developer, take decisions.

Apr 29, 2017

Aspnetcore Filters

ASP NET Core comes with a concept of filters. Filters intercept the stages of the MVC pipeline and allows us to run code before/after their executions. They are meant to be used for cross-cutting concerns; logics which is required accross the whole application, generally not business oriented. One example is authorization where in a Web API, we would use to prevent unauthorized request to execute the code in our controllers. In order to do that we would have a filter at the entrance of the pipeline. In fact, ASP NET Core has predefine stages, the diagram can be found on the documentation https://docs.microsoft.com/en-us/aspnet/core/mvc/controllers/filters. Another example of a cross-cutting concern would be for logging and timing functions. While the concept of filters is easy to understand, the way to implement those aren’t always straight forward, especially when the filter instantiation itself requires simple objects. In order to illustrate our example we will only filter the Action stage. The same implementations can be applied to any stages of MVC pipeline.

DotNetCore CSharp

Apr 21, 2017

Aspnetcore Authorization

Last week I touched on how we could authenticate users using Resource Owner Password flow with identity server. Authentication is the act of taking the information provided and verifying the “identity” of the user, ensuring that Alice (our beloved example user) is who she “claims” to be. In the program itself, we take her credentials and verify it and create and identity stating that the user is Alice and has claims A, B and C.

Authentication is the first part of the access security, the second part is the authorization. The difference being that for authorization, we know who the user is, what we are verifying is if Alice is allowed to perform what she is trying to perform. The easiest example is the difference between user access and admin access commonly seen in software where users are authenticated but aren’t authorized to perform all the actions available in the system.

DotNetCore CSharp

Apr 08, 2017

Cost Of Living In London

In 2015, I decided to relocate from Singapore to London. At the time I had no idea about the cost of living, the places where I should rent and places where the groceries would be the cheapest. Fast forward to today, March 2017, I moved back from London to Singapore. I stayed around London for more than a year and a half and while I was there, I kept an extremely close look to every in and out from my bank account. I even created an app Expense King to track my expenses coming out from my bank account.

Mar 29, 2017

Understand Bootstrap Flexbox

Last week we saw how to setup vscode to compile sass. Today we will see how we can compile bootstrap sass files together with our own sass and define a grid layout for the collapsed nav in smaller screen using flexbox.

Bootstrap

Mar 23, 2017

Setup Visual Code For Sass Development

Writing sass is very easy with code. Today we will see how we can leverage some NPM packages to compile SASS to CSS, watch file changes and live update the browser for an effortless style development.

Mar 09, 2017

Gimp Tips For Environment

Every now and then I discover features on Gimp that I didn’t know existed. It is always a good surprise to find a feature which simplify your work. So today I will show four features that I recently discovered.

Gimp