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...

1 minute read

Videum 2.0 is here!

After almost one year, yesterday we pushed to production the new version of Videum ! It’s a major milestone, this time we started the entire application from scratch, writing a brand new ad-hoc CMS and moving from MSSQL to MongoDB. The search engine instead is based entirely on Elasticsearch, with some minor...

1 minute read

Case-insensitive queries on MongoDB

Short version: you can’t. Long version: well…. you can’t 😀 Or at least you can’t NOW, based on what is stated here : . If you really need case-insensitive queries one option is to create another field with a lowercase representation of the text, put an index on it and run...

1 minute read

Best portal 2014!

I have just been told that the portal Razorfish Healthware that I developed for the Agency won the Web Marketing Association’s WebAward 2014 as “Best Portal Website of 2014” 😀 Here’s the link to the news: Yay!

1 minute read

Data pagination with WebAPI and AngularJS

UPDATE: wonder how to do the same using React and NodeJS? Read here! One of the first issues I faced while studying/working with AngularJS was how to do pagination with data received from the backend. Assuming that all the real paging is done server-side, I “just” needed a way to...

2 minute read

jQuery unobtrusive validation and custom date formats

Another quick reminder for my sloppy memory: in case you want to use a custom date format and you need validation (of course, why wouldn’t you?), sometimes may happen that the format you’re using is not recognised during the client validation phase. In one of my side projects for example...

1 minute read

Handling validation with dynamic forms

Quick tip, more of a reminder for me. In case you have to add/remove fields from a form dynamically and want to apply validation rules on client-side here’s how you should do: [csharp] $form.removeData(“validator”) .removeData(“unobtrusiveValidation”); $.validator.unobtrusive.parse($form); [/csharp]

1 minute read

11 Unconventional Tips for Improving your Programming Skills

This is just a repost of an interesting article I found today and I think it’s worth sharing. TL;DR (for all the lazy people out there, me included): 1. Eat Well, Sleep a Lot, and Stay Hydrated! 2. Take Periodic Breaks, and Get Increased Productivity 3. Learn How to Pump Yourself...

1 minute read