Pim Hooghiemstra

Webdeveloper and founder of PLint-sites. Loves to build complex webapplications using React!

About Pim Hooghiemstra

Webdeveloper and founder of PLint-sites. Loves to build complex webapplications using Vue and Laravel!

React toy project: Tactics (part 1)

Posted in Javascript on April 25, 2016

Today it is time to get started with some real React code. Following the approach described in ‘thinking in React’, we start with the setup of a static version of the app. The app we consider is a dartgame called Tactics. In short, two players hit the numbers 20 to 10 three times each. Once a number is completed (i.e., you hit it three times but your opponent did not), you can score points by hitting the number again. When both players have all numbers completed the points are calculated and the player with the highest score wins.

Read more

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

Javascript this, apply and call

Posted in on February 2, 2016

When cleaning up a large portion of Javascript code the goal is to reduce the complexity of individual functions and improve the overall readability. When we recently cleaned up an overwhelming JS codebase we were faced with some problems. More functions were introduced that were called from different places in the code. Since we were using the this keyword the context of calling these functions became important.

In this blog post we introduce a very simple tabbing system created with some HTML, CSS and JS to explain the different scenarios we encountered.

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

Passing objects by reference and by value

Posted in PHP on August 5, 2015

When you supply arguments to a function, these arguments will either be passed by value or passed by reference. This seems to be a subtle difference, but it could become a bit frustrating if you don’t know exactly what happens. The key thing to note is that simple variables such as strings, integers and floats are passed by value by default, but objects are passed by reference. If you need to use the object passed by reference, use the clone keyword to make a deep copy!

Read more