Dell Limerick Hackathon 2016

Hi everybody!

Last January we had an Hackathon here @ Dell Limerick, the main theme was “office productivity”, aka “how would you improve your and your coworker’s productivity”.

I was in a team with other 4 very smart guys, didn’t won but all in all it was a terrific experience…two days straight of brainstorming and coding madness combined with pizza and energy drinks.

The winners came up with an interesting prototype of a chat bot running as Lync addon that can answer every type of question, from “how’s the weather” to “who broke the last build?”, passing from “tell me about story 1234567”. I can’t go too deep in the details (also, lots of natural language analysis is involved) but it was definitely a very, very interesting project and really deserved to win.

My team instead…well we produced a voting platform for ideas. In a nutshell, every user registered to the community can post his ideas (which can be divided into macro-areas) and the others can vote it using points they have received when registering. If an idea is approved, the voters will get back the points and a small bonus. If an idea is cancelled instead, they will get the points back (but no bonus).

It was a cool project to work on, we used a very simple micro-service CQRS architecture running on AngularJS, WebApi and MongoDB. Oh and everything was hosted on Azure.

After the contest, we decided to release all the sources, you can find them on my GitHub repository.


“Mastering AngularJS for .NET Developers” is here!

Finally! I thought the package had gone lost but then…today the postman knocked the office doors aaaaaand here it is!

mastering angularjs - book


It’s an interesting book indeed. Covers most of the functionalities, front to back with an eye to the inner workings and how to integrate with .NET, EntityFramework and WebAPI.

Personally, I’m not a big fan of SPAs . I mean, for example there are cases when you need to hide some parts of the system using some kind of role management. Handling everything server-side “should” grant an higher level of security.

Also, you don’t send to the client unnecessary html blocks, which is always a good thing.

Anyway, here’s my little piece of satisfaction 😀

Data pagination with WebAPI and AngularJS – part 2

Hi all! Looks like the article I wrote some time ago about data pagination with AngularJS is still getting some attention, so I decided to give it a quick update just to spicy things a little bit.

In one of my project I needed a way to run different actions before running the actual pagination, so after some thought I decided to enter the marvelous world of callbacks.

In order to make things more generic, I took advantage of what I wrote in my last post and updated the pager code adding a callback on the page links: this way we can execute a custom function every time the user clicks on one of the links of the pager.

All I had to do was to create the isolated scope and add a pointer to the callback using the ‘&’ attribute. In case you need some refreshing, here’s a nice article about how to pass data to a directive.
Finally, you can check the code here, in the demoPager directive.

Here’s the link to the project on GitHub:


MVC: reading LinkedIn user profile data

Suppose you have to login your users using an external provider. Maybe LinkedIn. Suppose you have to read the user profile data and do some stuff. Maybe you have to register the guy on your website.
Maybe you know a bit of OAuth and you want to give it a try but maybe you don’t want to bother writing a library from scratch.

What do you do? Search on NuGet of course! I have found a nice library that helps with this, named Sparkle.LinkedInNET 🙂

Here’s a quick’N’dirty gist showing the bare minimum necessary to get the oauth token and reading  the profile data. Then use it wisely!

As you may imagine, the flow begins with the Profile action ( something like “http://mydomain/linkedin/profile” ). The user will be redirected to LinkedIn and from there back to your website, this time with a token that you can use to interact with the LinkedIn APIs.

Here’s the full code, enjoy 🙂

AngularJS + MVC : how to pass model from server to Angular controller

Here’s a quick tip on how to pass a complex model from server side to an AngularJS controller.
The idea is to serialize the model to json (I am using the majestic Newtonsoft library for that), store it into a javascript variable and then create a provider with it on the AngularJS application that will be injected in the controller.

Here’s the controller code:


myApp.controller(‘myController’, [‘$scope’, ‘viewModel’,
   function ($scope,  viewModel) {
        $scope.viewModel = viewModel;


and here’s the MVC View

<div ng-controller="myController"> …. </div>
<script type="text/javascript">
var model = @Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(this.Model));
myApp.value("viewModel", model);

© 2019 Davide Guida

Theme by Anders NorenUp ↑