First steps with Knockout
As Knockout seems to be there by default with MVC4 and MVC5 and its creator is now working with Microsoft it seems wise to have a look at it and check how good it can be to go the MVVM way....
View ArticleGetting into Bootstrap!
Bootstrap is another javascript library to help us making our websites better and simpler. It’s main core is to be a handful set of CSS styles to make your website automatically responsive, this is,...
View ArticleMVC5 with Bootstrap 3.1.1 LESS files
MVC5 already comes with Bootstrap and LESS by default, but unfortunately it doesn’t come with Bootstrap LESS files to custom them in case you want to do that. Luckily Osowicki created this template...
View ArticleQuick Introduction to LESS
These are some of the features LESS is offering you: Creating variables You can save a value on a variable and use it later, quite useful to set colors: @myCustomColor: #567; @primaryColor: blue;...
View ArticleLoading scripts using RequireJS
With all the front-ending needing so many script libraries, plugins or even frameworks like Angular, the amount of scripts to load and, even more, the order in which they need to be loaded has...
View ArticleCreating directives with Angular
One of the main points of angular consists on adding functionalities to your html elements, so that instead of setting the effects the jQuery way: selecting the element and making that happen or adding...
View ArticleAdding video src with Angular
Well, well, well… if you try to add a video to your page and use Angular to set its URL… you may discover that Angular doesn’t allow you to do that. This is because Angular blocks some possible hacking...
View ArticleUsing LESS client-side
You need to download and add to your project less.js and call it from the HTML page: <script src="less.js" type="text/javascript"></script> Then, add the call to the .less file/s making...
View ArticleNode.js
Node is a javascript based server that allows to run javascript based applications in your computer without having to open or use any browser. This means that javascript applications can be run as...
View ArticleConfiguring Karma to test Angular apps using RequireJS
Installing and configuring a testing environment for an Angular application hasn’t been very straightforward for me but here are the steps I took (the right ones, at least). Configuring Karma First of...
View ArticleUnit Testing AngularJS applications
References Tutorials Tutorial with good tips and approach Another very good tutorial with more tips How to test a Filter How to test a Service How to test a Directive Documentation Chai syntax...
View ArticleECMAScript Browser’s compatibility
Just a nice website to check current browser’s compatibility table with different versions of ECMAScript. You can check the version clicking on the header but just in case: ECMAScript 5 Compatibility...
View ArticlePost template
This is a post to test how do styles look in my blog in case I were to change the theme, so I’m going to add some Lorem ipsum paragraphs with some stuff I usually have when I write a post: Lorem ipsum...
View ArticleSpying with Mocha and Sinon.js
Sinon spies Spies on sinon are redirected functions that will notify of any call to them. Let’s see an example: var myGreatObject = { myAwesomeMethod: function () { console.log(1); //do something } };...
View ArticleDifference between faking, mocking, and stubbing
Quick answer Stub – an object that provides predefined answers to method calls. Mock - an object on which you set expectations. Fake - an object with limited capabilities (for the purposes of testing),...
View ArticleHTML Email tricks
Tips to write HTML Emails that I’ve found. Note this post can be bsolete as email readers are constantly changing and evolving. Background images It is just not possible to add an image as a background...
View ArticleEquivalent to C#’s null coalescing in javascript… or similar
Just an idea: var profileData = rawData.TheirUserProfile ? rawData.TheirUserProfile : rawData.UserProfile ? rawData.UserProfile : null;
View ArticleHTML Emails: GMail Andriod App
While it looks like most email readers are moving into accepting standards as much as possible GMail has a bit of a weak point when it comes to its Android App (not the website though). I got myself in...
View ArticleAngular directives and scope
When creating directives with angular, you can choose to use the parent’s scope, create your own isolated scope for the directive or have an inherited one. Let’s see what types of scope we have and how...
View ArticleUsing Google Tag Manager with AngularJS
One would expect that being Angular a Google product and Google Tag Manager another of their products combining them would be quite simple and straightforward, but I personally had my doubts and not...
View Article