Since our nosedive in Javascript there is a ton of things to learn and the greatest new insights are written down in posts in this category.

React and JSX: my reminders

Posted in Javascript on April 4, 2016

JSX is the language that React uses to render components. At first glance the syntax is a bit weird but in this post I write down some of the peculiarities in a reminder list. A very simple login form component is included to show how to use JSX in practice.

Read more

Starting with React

Posted in Javascript on March 10, 2016

2015 was definitely React year. React is the hot new framework build by Facebook and in my opinion worth checking out. Starting with React seems to be a bit difficult so after reading a lot of ‘starting with React’ posts, I decided to buy a premium course. In this and coming posts my thoughts on that.

Read more

Using npm packages in Javascript

Posted in Javascript on December 3, 2015

npm is a big resource of Javascript packages. With some easy commands you just include whatever package directly in your project. The package.json file is very important for several reasons and we will discuss a few in this post.

Read more

Modular Javascript inside a Laravel 5 project

Posted in Javascript on November 10, 2015

Here we describe a typical approach of modular Javascript inside a Laravel 5 project. We start by creating some modules and continue the whole process from dependency management towards bundling, minification and creating production ready Javascript. This process is extremely easy to setup using Laravel Elixir with Browserify. You just have to put your files in the right place!

Read more

JS: The story of merging and minifying your code

Posted in Javascript on October 10, 2015

To merge or not to merge? That’s the question for Javascript developers. When you are working on the code you want to split your code in small reusable modules in order to maintain an organised and structured code base. But on the production server you want to minify the number of HTTP requests to improve the overall loading time of your page. In this post we discuss this subject in detail and come up with some tools you can use to achieve this result.

Read more

Styling fonts with jQuery: a tutorial

Posted in Javascript on September 4, 2015

Recently we showed some CSS font properties. Sure CSS3 can achieve a whole lot and it is often better for performance of your site to achieve as much as you need with CSS only, but there are a lot of funny jQuery plugins and today I like to show you some examples of these as well.

Read more

Javascript modules and jQuery events

Posted in Javascript on August 28, 2015

Writing good Javascript code is tricky. A first step achieving this goal is to start writing modules in Javascript. Modules make way for structured, organised code that does one thing and one thing well. With the update of our website at PLint-sites, I improved the Javascript by using modules. The module I would like to discuss in this blog is for validating a simple form. Here jQuery comes in because we like to let the user know early on if he makes a mistake in filling out the form fields.

Read more

Javascript modules: why and how?

Posted in Javascript on July 17, 2015

Writing testable and maintainable Javascript code is not easy. Starting with Javascript modules is a good first step to write reusable code blocks that are testable. Small codeblocks that perform one task will also help maintaining your code. But how to write a proper Javascript module? In this post we summarise the steps.

Read more

First moments with ESLint

Posted in Javascript on June 4, 2015

When writing Javascript code it is very easy to make mistakes that do not immediately break your code. Instead, it is possible to finish with a bunch of code lines that will behave unpredictable. Linting tools are there to help you with this. Simple syntax errors are one thing, but linting tools do much more. Here we describe ESLint, a fully configurable tool that is easy to install and use once configured.

Read more

Event delegation in jQuery using .on

Posted in Javascript on February 14, 2013

With jQuery it is easy to attach event handlers to a DOM element. However, suppose a list of links is added to the page after clicking a button. A normal click event attached on page load will not work: nothing happens, not even an error is thrown in your face. Luckily, with event delegation we can solve this issue.

Read more