Category: Web development

  • Organizing jQuery code with Flight.js

    If you use jQuery for your projects and don’t organize code in some way, you should definitely check out Flight.js, a web framework created and used by Twitter. Flight.js lets you organize jQuery code in components (basically a self contained HTML markup where standard DOM events are handled by user-defined callbacks). These components communicate with…

  • Testing React components

    There are two aspect of testing React components: testing their structure (desired markup is displayed) and behaviour (e.g. when clicking on a button this function will be called or something different will appear in component’s markup). Testing component structure is best done with shallow rendering since it renders only provided component and not its potential…

  • Learning Redux: A step beyond “todos” and “async” examples

    For the past two days I’ve been into Redux. It’s a framework-agnostic JavaScript library for easier handling of all application’s state. Specialty of Redux is that application state is stored in one object (and not different object for different data domain) and that functions reducers which manipulates part of the state never mutate it but…

  • Exporting data as CSV file from web apps (with Golang)

    While you can certainly export data from javascript with two different ways, they both aren’t good solutions. First one doesn’t allow you to name the downloaded file (it’s just download), second is only supported in Chrome, Firefox and latest version of Microsoft Edge (by the time of writing this post). So the only acceptable option…

  • WordPress Customization API

    With Customization API WordPress introduced new way of changing an appearance of WordPress theme which I think is more user-friendly since theme’s appearance settings are shown besides your website and can be updated live so you can see changes immediately. Here is an example of use where I added a textarea control in Customize page…