PWAs and Django

Posted on 2020-02-29 in Programmation • Tagged with Python, Django, PWA, JavaScript

In this article, I'll guide you to create a PWA with the Django framework. All the code for this project is available under my gitlab account. You will find in each sections links to the relevant commits to help you follow. If something is not clear or if you have …

Continue reading

Why you probably want to make a SPA

Posted on 2020-01-12 in Programmation • Tagged with JavaScript, Web, Django


I created an updated version of this article in should you build a SPA which provides a more complete and balanced view on this subject. Please read it instead of this current article.

I am currently working professionally on a website that is not a SPA. I'd like to …

Continue reading

Writing a PWA with Aurelia

Posted on 2019-09-01 in Aurelia • Tagged with JavaScript, TypeScript, Aurelia, Mobile, PWA

I feel like Progressive Web Application (PWA for short) are a more and more popular way to build mobile apps. That's understandable since you can use the same technology you use to build a SPA to build one! So …

Continue reading

Some thoughts on Aurelia Store

Posted on 2019-08-24 in Aurelia • Tagged with JavaScript, TypeScript, Aurelia, RxJS

On my spare time, I am developing a board game that uses the Aurelia framework. I currently manage the state in a service without any dedicated state management solutions (like RxJS, Aurelia store, Redux, …). And I feel I am reaching to the limit of what I can do with it …

Continue reading

Issues while writing tests for a component using i18n

Posted on 2019-08-04 in Aurelia • Tagged with JavaScript, TypeScript, Aurelia, i18N

Some time ago, I wanted to add some tests (behavior and render) on an Aurelia component that uses the i18n plugin and more precisely the df attribute in the view to display a localized date.

Since it was a while back (I wanted to write it earlier but couldn't), my …

Continue reading

Extract translations from your Aurelia app

Posted on 2019-08-03 in Aurelia • Tagged with JavaScript, TypeScript, Aurelia, i18N

If you use Aurelia with the i18n plugin, you will have to maintain JSON files that will map a translation key to an actual translation. Manually editing the file to add/remove keys can be tedious.

Luckily, keys can be extracted automatically thanks to i18next-scanner. It can extract translation keys …

Continue reading

JavaScript tips

Posted on 2018-03-07 in Trucs et astuces • Tagged with JavaScript

Normalize an UTF-8 string

Rely on String.prototype.normalize().

const str = "Crème Brulée"
str.normalize('NFD').replace(/[\u0300-\u036f]/g, "")
> 'Creme Brulee'


Utiliser istanbul pour voir le code coverage de tests lancés avec protractor

Posted on 2015-09-25 in Programmation • Tagged with istanbul, javascript, protractor, AngularJS, code coverage

Récemment j'ai eu besoin d'avoir du code coverage (assuré par istanbul) pour des tests d'intégration d'une application AngularJS. Ces tests sont lancés avec protractor et ce n'est pas aussi simple qu'il n'y parait. L'idée de base est :

  • D'associer une fonction à la clé onPrepare dans la configuration de protractor. Dans …

Continue reading

AngularJS tips

Posted on 2015-04-26 in Programmation • Tagged with JavaScript, AngularJS

This page lists all the angularjs tips I have collected.

Disable HTTP request caching

This is mostly useful on Internet Explorer: every HTTP requests made with the $http service …

Continue reading

Utiliser AngularJS et Django pour faire des requêtes AJAX

Posted on 2014-10-25 in Programmation • Tagged with Django, JavaScript, AJAX, AngularJS

Dans ce petit tuto, je vais vous expliquer comment faire pour poster un formulaire Django via une requête AJAX en utilisant le framework JavaScript AngularJS. Tout d'abord, il faut un peu de préparation. Voici le modèle que nous allons utiliser (les imports ne sont pas précisés et je suppose que …

Continue reading