How to: Build a Serverless Web Application

Build a Serverless Web Application

Follow step-by-step instructions to launch your first serverless web application on Amazon Web Services (AWS)


In this learning path, you’ll deploy a simple web application that enables users to request unicorn rides from the Wild Rydes fleet. The application will present users with an HTML based user interface for indicating the location where they would like to be picked up and will interface on the backend with a RESTful web service to submit the request and dispatch a nearby unicorn. The application will also provide facilities for users to register with the service and log in before requesting rides.

The step by step guide

The tutorials I’ve read to learn Angular 2

Reposed from:

The tutorials I’ve read to learn Angular 2

Here is a curated list of some good tutorials we used to learn the version 2 of angular.


Official angular 2 tutorial
Light weight documentation with both ES6 and Angular 2 made by Ionic team
Learn angular 2
132+ Video tutorial on specific pratical cases
nicely focused tutorials on a medium hoste dev site
Data binding

Custom text area, input… data binding


Guide to forms in angular 2

Angular forms beyond the basics Some more advanced form topics like automatically adding class for bootstrap or async validation…

Edit forms value programatically : setValue and patchValue

Reactive forms or model driven fields

Using Angular2 model driven forms
Introduction to Angular 2 Forms – Template Driven vs Model Driven or Reactive Forms
Reactive forms
Forms fields

Example of different types of fields
Events / Change detection

Event and @output decorator
Change detection in Angular 2
How to replicate $scope.$emit with global events ? More technics that official ways

Children view
Dump / Smart component architecture : A way to organize component to differentiate presentational component highly reusable and intelligent component that actually handle the logic and specific stuff

View children, view child and query list
Components @input

How to define a inner child component property on-change to allow pass observable as input.
Component ngInit vs constructor

Difference between constructor and ngOnInit
Dynamic component / Component inheritance / Communication between components…

dynamically creating component in angular 2

Component inheritance introduced in 2.3

Different ways for communication between components :

With input with a setter
With input via ngChanges detection
With @viewchild that allow to manipulate child methods
With a service and observable subject


How to use the angular 2 renderer service to manipulate the DOM in a way all platforms (server, browser, mobile.. can accept)

How to use window like with the good old $window angular 1
In this tuto, you learn how to do a wrapper of window to inject in with DI only if usable (in the browser)


Structural (ngIf…or custom) or attributes (ngClass… or custom) directives

ng-show / ng-hide in angular 2 : the angular 2 solution is to bind to hidden prop but there is some issue so read this article to decide which practice to use

Observables / RxJS

Angular 2 adopted this new concept of observable which basically is a more advanced form of promise. RxJs is the implementation of Observable used by angular which is being developed by Microsoft.

This post list 3 common problems with can have with observable.

Pitfall 1 : not subscribing to an observable is similar to having a function but not exucuting it

An observable itself is just a definition of a way to handle a stream of values. We can think of it as something close to a function. Creating an observable is somewhat similar to declaring a function, the function itself is just a declaration. Calling the function is something entirely different, as defining a function does not execute its code.

We need to call the function in order for something to happen, and that is also the case with an Observable: we need to subscribe to it in order for it to work!

Building a data store with observable

The Doc of observables transform operator

ngFor, ngIf, …

Revision of what ngFor can do
how to get the index
how to track by another value that default (by object Identity)
using odd, even, last, first for dynamic class naming
ngFor by default tracks list items using object identity. This means that if you build a list of new objects from scratch with the exact same values as the previous list and pass this newly built list to ngFor, Angular will not be able to tell that a given list item is already present or not.

ng-template and odd, even, last variable in ngFor

Organize your code in a modular way. Import a module instead of importing a dozen of files (javascript modules). Despite of the use of ES6 modules in angular, angular modules @ngModules are still useful to bundle a feature or a shared utility together.

The ng module FAQ is a good place to better understand the ngModules API fine tuning!#q-declarable

The angular university tutorial on ngModule

the official style guide module section!#application-structure-and-angular-modules

Decorator / Annotation syntax [Typescript]

Difference between decorator and annotation
Dependency injection

How to inject window in a service to keep it compatible with angular dependency injection philosophy

Simple tutorial to do a custom pipe available in its components then make it available application wide

In depth practical article on the new angular 2 router

How to use guards to prevent access to some pages

Named router oulet (same as UI router)

ES 6

Exploring JS / Full online book on javascripting with extensive doc on ES6

Detailed explanation about how the modules resolution works for the typescript compiler. How typescript find a module when we write something like :
// Relative import
import { Component, Input } from ‘@angular/core’;
// Non relative import
import { OptionService } from ‘../../../services/api/option.service’;

System.js / JSPM

A installation guide using JSPM / Typescript and System.js
Angular 2 & firebase

Detailed post that explained the principle of firebase, why it is a good solution for BaaS application and allow to develop faster. Then it describe the integration in Angular2 with the angular fire library
The official docs ?
The doc in the project
AOT Ahead of Time Compilation

Demystifying AOT : Nice slides that present AOT as an easy thing …
Integration of external library / Jquery

Wrap any jQuery plugin with Angular 2 component — case study.
Angular CLI

The ultimate guide of angular CLI

New release

What is new in angular 4
### Stripe integration

a bit old but clear

automated test with angular 2
Webpack build

Importing css with webpack angular starter
Zones & ngZone

runing something outside angular zone so that we skip angular change detectionusing-zones-in-angular-for-better-performance.html)
Written on December 15, 2016

Repost: Mobile API Security Techniques, Part 2 API Tokens, Oauth2, and Disappearing Secrets

Take a look at Hands On Mobile API Security: Get Rid of Client Secrets. It focuses on API keys usage and adds in a proxy server which is a good practice when multiple APIs are called form the same app. The full example is at github —
OAuth2 is not used in that example, but it could be added without interfering with the existing app authentication code. Look at Mobile API Security Techniques, Part 2 for some additional background.

View story at

Use DMVs to determine based on past executions which indexes would be beneficial in that database.

The following SQL should be run in Production SQL server (off hours). It basically uses DMVs to determine based on past executions which indexes would be beneficial in that database. It recommends what indexes could be created on the specified tables.

 migs.avg_total_user_cost * (migs.avg_user_impact / 100.0) * (migs.user_seeks + migs.user_scans) AS improvement_measure
 'CREATE INDEX [missing_index_' + CONVERT (varchar, mig.index_group_handle) + '_' + CONVERT (varchar, mid.index_handle)
 + '_' + LEFT (PARSENAME(mid.statement, 1), 32) + ']'
 + ' ON ' + mid.statement
 + ' (' + ISNULL (mid.equality_columns,'')
 + CASE WHEN mid.equality_columns IS NOT NULL AND mid.inequality_columns IS NOT NULL THEN ',' ELSE '' END
 + ISNULL (mid.inequality_columns, '')
 + ')'
 + ISNULL (' INCLUDE (' + mid.included_columns + ')', '') AS create_index_statement
--, migs.*, mid.database_id, mid.[object_id]
FROM sys.dm_db_missing_index_groups mig
INNER JOIN sys.dm_db_missing_index_group_stats migs ON migs.group_handle = mig.index_group_handle
INNER JOIN sys.dm_db_missing_index_details mid ON mig.index_handle = mid.index_handle
WHERE migs.avg_total_user_cost * (migs.avg_user_impact / 100.0) * (migs.user_seeks + migs.user_scans) > 10
ORDER BY migs.avg_total_user_cost * migs.avg_user_impact * (migs.user_seeks + migs.user_scans) DESC


IdentityServer3 Custom Views for login

So in my endeavors to support Facebook, Google, Outlook and etc login providers the middle ware IdentityServer3 on git has proven worth its weight in gold.

If you need to customize the views for a client, let us suppose a customer wants the login page to be branded for their company logo….What??… the nerve of them.. lol… Seriously, it is extremely easy… See this link: [ branding ]  Perhaps they want to use a bootstrap theme, different layout or various validation rules… See that link…


My next post will be about using this with an Angular2 application. Much easier than I even thought!