Angular 2 server side paging using ng2-pagination

31 March, 2016.

Angular 2 is not quite out of beta yet (Beta 12 at the time of writing) but I’m in the full flow of developing with it for production use. A common feature, for good or bad, is to have lists/tables of data that the user can navigate through page by page, or even filter, to help find something useful. Angular 2 doesn’t come with any out of the box functionality to support this, so we have to implement it ourselves. And of course what the means today is to use a third party package! To make this…

Continue reading

Create a RESTful API with authentication using Web API and Jwt

15 March, 2016.

Web API is a feature of the ASP .NET framework that dramatically simplifies building RESTful (REST like) HTTP services that are cross platform and device and browser agnostic. With Web API, you can create endpoints that can be accessed using a combination of descriptive URLs and HTTP verbs. Those endpoints can serve data back to the caller as either JSON or XML that is standards compliant. With JSON Web Tokens (Jwt), which are typically stateless, you can add an authentication and authorization…

Continue reading

Quick tip - Avoid 'async void'

30 August, 2014.

When developing a Web API application recently with an AngularJS front end, I made a basic mistake and then lost 2 hours of my life trying to figure out what was causing the problem … async void. Its pretty common nowadays to use tasks to improve performance/scalability when writing a Web API controller. Take the following code: At a high level, when is executed the call will be moved off onto another thread and the execution of the method will only continue once the operation is complete (when…

Continue reading

Create a telephone directory with Bootstrap, KnockoutJS, jQuery, Web API and Entity Framework (Part 2 of 2)

12 March, 2014.

I find that the best way to learn any new technology, or technology that are unfamiliar with, is to sit down and practice. The purpose of this very simple tutorial is to learn the basics of creating a single page website that can be used to capture peoples names and telephone numbers. By following this tutorial you will learn; How to use Bootstrap to create a simple UI How to use KnockoutJS for binding to/displaying of your data How to use jQuery to asynchronously retrieve data from a web…

Continue reading

Create a telephone directory with Bootstrap, KnockoutJS, jQuery, Web API and Entity Framework (Part 1 of 2)

08 March, 2014.

I find that the best way to learn any new technology, or technology that are unfamiliar with, is to sit down and practice. The purpose of this very simple tutorial is to learn the basics of creating a single page website that can be used to capture peoples names and telephone numbers. By following this tutorial you will learn; How to use Bootstrap to create a simple UI How to use KnockoutJS for binding to/displaying of your data How to use jQuery to asynchronously retrieve data from a web…

Continue reading