Building Apps with Polymer and ASP.NET CORE (Part - III)

We were done with the API creation part in the previous post. Let’s finish up the app by connecting the simple-todo component with those APIs. Basically we need to call our APIs to do that. We are going to do that with a Polymer component called iron-ajax. It makes Ajax easier to work with. So, just like what we did for every third party components lets install iron-ajax with Bower. Then add it to the header section of your HTML document. Here is the command to install iron-ajax bower…

Keep reading

Building Apps with Polymer and ASP.NET CORE (Part - II)

OK! As I told you in the previous post that I will make APIs using ASP.NET CORE Web API to be able to Add, Update, Edit and Delete todo items on the server side but the good news is ASP.NET CORE documentation already has an article on that. Here is the link, https://docs.asp.net/en/latest/tutorials/first-web-api.html Wait a minute! That doesn’t mean I’m not going to do anything in this post. If you went through that article already then you may…

Keep reading

Building Apps with Polymer and ASP.NET CORE (Part - I)

So, I guess you have been running wild with Angular lately. If that so, then I’m pretty much sure that you are familiar with the concept of directive. HTML5 too came up with this concept of creating custom components and they call it web components. But today’s lesson is not about web components rather it is on a third party library that is built upon web components. Like JQuery, which is basically a library to work with javascript somewhat easily, Polymer is a library which can help us…

Keep reading

Configuring Typescript for ASP.NET CORE Apps

Start with an empty project Open up Visual Studio 2015 and create a new ASP.NET Core Web Application. Make sure you have ASP.NET CORE RC2 installed in your PC if you want to follow this walkthrough step by step. Choose the Empty Template from the available ASP.NET Core Templates since we are totally starting from scratch. After your project is created, it should restore required NuGet packages defined in the project.json file. The empty project solution will look like this, Adding a default html file To…

Keep reading

NDepend - A Dependable Static Analyzer

Two weeks ago I wasn’t so much familiar with the terms static analysis and analyzer. I mean, I heard those terms here and there but didn’t really give it a proper look. Then comes the time when Patrick Smacchia (Creator of NDepend) asked me to give NDepend a go. So I found it as an opportunity to learn about these stuffs and here I’m writing a blog about it. ‘Nuff history lessons. Let’s talk about what static analysis or analyzer really is. Static analysis is a…

Keep reading

NPM, BOWER, NUGET, GULP – The Four Horsemen of ASP.NET CORE Apps

It's not really a introduction Okay! So I’m not going to waste your time here giving some definitions of these four well known and broadly used tools. Rather I’ll show you how you can get most out of these tools while working on an ASP.net core web applications. I’m going to start with a blank project and will add these tools (except for NuGet. All Asp.net core apps support NuGet by default) one by one in the project. Finally you will have a good understanding…

Keep reading

Creating Simple APIs for your AngularJs App with .NET CORE Web API

Starting from the scratch So, we are starting with the empty Asp.net Core template. I’m using Visual studio 2015 and I’ve.NET Core RC2 SDK installed in my machine. Both of them are available for download in the following links, .NET Core SDK - https://www.microsoft.com/net/core Visual Studio 2015 - https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx Adding Dependencies We basically need two dependencies, one for serving static files (Microsoft.AspNetCore.StaticFiles) and another one for creating the APIs (Microsoft.AspNetCore.Mvc)…

Keep reading

Preventing XSRF in AngularJS Apps with ASP.NET CORE Anti-Forgery Middleware

What is Cross Site Request Forgery (XSRF/CSRF) Cross Site Request Forgery (XSRF/CSRF) is a type of a security breech where a hacker can trick the user into making unwanted requests to a web application where he/she is already authenticated. When a user is authenticated, his/her authentication cookie is stored in the browser’s storage. Since the cookie stays active unless the browser is closed and reopened, an authenticated user can be forced to make requests to the application from other unsafe applications too. For example, assume…

Keep reading

AngularJS and ASP.net Core 1.0 JumpStart (Part – III)

Creating the ASP.net Core 1.0 MVC project Okay, this part of the series will be pretty much big. So take time and read all the stuffs that I’ve done here. We will create a ASP.net Core 1.0 MVC project first. If you don’t have it installed already, please visit this link and follow the instructions to install it in your favorite operating system, https://docs.asp.net/en/latest/getting-started/index.html After installing, open up your Visual Studio 2015 and create a new…

Keep reading

AngularJS and ASP.net Core 1.0 JumpStart (Part – II)

Adding about and howto controllers Welcome to the part two of AngularJs and ASP.net Core 1.0 JumpStart! In part one we configured routing for our app and also attached views to those routes. We will implement the game logics in this post. To handle client side business logics, we will implement three angular controllers respective to the three views we have. Let’s implement the controllers for the howto and about views first since they are pretty much easier. In your app folder under js add two new…

Keep reading