# js
-
JavaScript _ 2026-01-05
Streaming JSON in just 200 lines of JavaScript
I was continueing my exploration of React server components when I stumbled upon on this article about progressive JSON. Dan Abramov describes a technique for streaming JSON from a server to a client in chunks, allowing the client to start rendering parts of the data before the entire payload has been received. This can significantly improve perceived performance, especially for large datasets. So, I started wondering how much of an effort it would be to implement something like that. It turned out a fun exercise, and I ended up with a small (200loc) library called Streamson. So, this post is about how I built it.
-
JavaScript _ 2021-12-19
How I wrote and published my 5th technical book
I like to write. It's not happening often, but I do. A couple of weeks ago, I finally finished my 5th book, "50 Tips on JavaScript". I decided to use Amazon as a distributing mechanism. In this article, I'm sharing my journey. From the idea, through the writing and the publishing.
-
JavaScript _ 2018-11-13
Build your own interactive JavaScript playground
Recently I spent some time working on my own JavaScript playground called Demoit. Something like CodeSandbox, JSBin or Codepen. I already blogged about why I did it but decided to write down some implementation details. Everything happens at runtime in the browser so it is pretty interesting project.
-
JavaScript _ 2018-06-29
A story about React, Redux and server-side rendering
Long long time ago in a kingdom far far away there was an app. The app was supported by the well known React and Redux families but there was a problem. It was damn slow. People started complaining and the app had to do something. It had to deliver its content quickly so it provides better user experience. Then the server-side rendering was born.
-
JavaScript _ 2017-12-01
Markup as function
If you are writing React applications you probably know about higher order components or render props (which by the way I think is kind of a form of higher order component pattern). In both cases we have a component that encapsulates logic and passes props down to children. Recently at work we came to the idea that we may push this further and represent some functionalities which are out of React in the same fashion - with a single tag in our components tree.
-
Must-see _ 2017-01-02
8 Years of blogging
The first article on this blog is published on 22th of August 2008. It’s about a website which I saw at FWA. Eight years later I’m still publishing stuff here and because it is the beginning of a new year I decided to give you some statistics.
-
JavaScript _ 2015-12-30
Start your own JavaScript library using webpack and ES6
Two months ago I published a starter pack for React based on webpack. Today I found out that I need almost the same thing but without the React bit. This simplifies the setup but there are still some tricky parts. So, I made a brand new repository webpack-library-starter and placed all the stuff that we need for creating a JavaScript library.
-
JavaScript _ 2015-12-23
Using Mocha with ES6 spec files
The new ES6 specification of JavaScript simply works better for me. It helps expressing my ideas in a shorter and cleaner way. So, I want to write ES6 everywhere. Even while I’m testing my applications.
-
JavaScript _ 2015-11-23
Distributing React components
While I was open sourcing react-place I noticed that there is some complexity around preparing the component for releasing. I decided to document the process here so I have a solid resource next time. You may be surprised but writing the working
jsxfile doesn’t mean that the component is ready for publishing and is usable for other developers. -
JavaScript _ 2015-10-01
A modern React starter pack based on webpack
Checkout React webpack starter in GitHub.
You know how crazy is the JavaScript world nowadays. There are new frameworks, libraries and tools coming every day. Frequently I’m exploring some of these goodies. I got a week long holiday. I promised to myself that I’ll not code, read or watch about code. Well, it’s stronger than me. React werbpack starter is the result of my no-programming week.
-
JavaScript _ 2015-08-23
How require/import may decrease your testability
When CommonJS was announced we all thought “Finally something that will organize our code”. However, there are some cons that we should be aware of. It’s not only unicorns and rainbows. In this article we will see how a simple
requireline makes our code difficult to test. -
Nodejs _ 2015-01-07
Fun playing with npm, dependencies and postinstall script
I like npm and the fact that I can install tons of stuff. It’s great piece of software and helps me solve problems everyday. Yesterday I had to use a
postinstallscript and hit a problem. -
JavaScript _ 2014-11-20
Unit test your client-side JavaScript
I don’t think that we have to discuss the importance of having tests. That’s not something that we add to the project in addition. That’s something that the project is based on. And because testing is so important we have bunch of tools in our disposal. We all know (I hope) how to test our back-end code. However, once we move to the front-end is a bit different. At the moment we are working on a big single page application and testing is one of our main focuses. In this article you will see how to unit test our client-side JavaScript.
-
Nodejs _ 2014-08-12
Win Free Copies of my new book – Node.js Blueprints
Readers would be pleased to know that I have teamed up with Packt Publishing to organize a Giveaway of a new book written by me - Node.js Blueprints. And three lucky winners stand a chance to win 3 e-copies of this book. Keep reading to find out how you can be one of the Lucky Winners.
-
Nodejs _ 2014-07-30
Node.js Blueprints book - second chapter's clarification
Before a couple of months my first book Node.js Blueprints was published by Packt. There are a couple of reviews in Amazon about chapter two. It’s about Express. One of the most popular frameworks in the Node.js ecosystem. The book mentions version 3.0 but the truth is that the code samples are for version 4.0. I feel that I still have to point out the differences and mark these parts of the chapter that are not valid for the newest version of the library.
-
JavaScript _ 2014-07-26
ToDoMVC with AbsurdJS
-
Must-see _ 2014-07-15
Usersnap - the holy grail of bug reporting
The bug reporting is something very important for us. As developers, we produce code that should work everywhere. Not only on our machines. No matter how many times we test our application it often happens that it does not work properly for the client. We all know how helpful is an email with text “It does not work. Fix it ASAP!”. Usersnap is amazing tool that removes the gap between you (the developer) and the non-techy guy from the other side.
-
Must-see _ 2014-06-22
Hungry for knowledge - Scotland JS 2014 talks
These are screencasts from the this year's Scotland JS conferences. It happened on 9th and 10th of May. If you are a JavaScript developer you will probably want to see the talks.
-
JavaScript _ 2014-06-19
Stop autoplaying your Gifs
This blog has 460 posts. In some of them, I need to show video clips demonstrating some feature or browser behaviour. I found that it was much better to do that in an animated Gif. However, they play automatically which is kinda annoying. Imagine that we have ten Gifs on the page and while you are reading they all blink or show moving content. It's like having a page full with banners.
-
Nodejs _ 2014-06-09
Developing Node.js applications with Google Chrome
Google Chrome is my favorite browser. I'm spending a big part of my working hours there, so it makes sense to use it for everything. Last week I posted "Sorry, Chrome killed the terminal". The article was about Yez!, an extension that brings terminal-liked functionalities to the browser. Today, I'll show you how I use Chrome in my Node.js development workflow.
-
Nodejs _ 2014-06-07
Node.js application made with Express and AbsurdJS
Node.js is one of those new technologies, which are attracting more and more developers every day. Mainly, because it's JavaScript driven, a lot of people are interested working with it. In this tutorial, I'll show you how to use AbsurdJS together with Express. Express is one of the popular Node.js frameworks. However, the other instrument is really fresh one and I hope that you will find it useful.
-
Nodejs _ 2014-06-04
Sorry, Chrome killed the terminal
That's right. I'm not using the terminal anymore. Instead of that I'm using Chrome. Yes, the Google's browser. There is an extension called Yez! that connects to a Node.js module via web socket. It executes the shell commands and returns the result. And even works under Windows.
-
Nodejs _ 2014-05-21
Node.js: managing child processes
These days I spent some time working on Yez!. Chrome extension whose main role is to replace the annoying switching between the terminal and the browser. It uses Node.js module to run shell commands. So, I had to deal with child processes, and I decided to document my experience.
-
JavaScript _ 2014-03-25
Look ma, JavaScript only Off-Canvas menu
The off-canvas menu is pretty popular nowadays. You know, the little button in the right upper corner which opens the navigation with a slide-in effect. That's what we are going to build in this article. The interesting things is that we are not going to use CSS neither HTML, only JavaScript.
-
JavaScript _ 2014-03-04
Using media queries in JavaScript (AbsurdJS edition)
If you believe in responsive design you probably use a lot of media queries. That's a CSS feature which gives us the power to add something like if statements. We are able to apply rules only if the current page meets certain conditions. In this article I'll show you how I use media queries in JavaScript.
-
CSS3 _ 2014-02-12
Simple, good looking separator made with pure CSS
-
Nodejs _ 2014-01-14
SASS and Gruntjs (Node.js setting up)
-
JavaScript _ 2013-11-11
AbsurdJS fundamentals
AbsurdJS became one of my favorite projects. I spent a good amount of time developing it and it's getting more and more interesting. I also received some positive feedback, so I think it is time to write a bit more about the module and explain how it actually works and what exactly is made for.
-
Must-see _ 2013-10-12
JSConf EU 2013
An amazing talks from JSConf EU this year.
-
JavaScript _ 2013-08-08
AJAX request doesn't work in IE (url encoding problem)
The good old Internet Explorer. It's full with surprises. I just fixed a bug happening only in IE. Everything works just great in every other browser.
-
JavaScript _ 2013-08-02
DalekJS - Automated cross browser testing with JavaScript!
If you like instruments like Selenium or Phantomjs you should definitely check DalekJS. Written by Sebastian Golasch this nodejs module could help you to test your front-end.
-
ActionScript _ 2013-06-11
A strange IOErrorEvent.IO_ERROR event dispatched
Really simple GET request from a flex based application. However it fails if GET parameters are passed.
-
HTML5 _ 2013-03-31
Make the web faster
Slow JavaScript code on your pages? Chrome provides both a sampling, and a structural profiler to help you track down, isolate, and fix the underlying problem. Tune in to learn how to use both profilers, and how to improve your own workflow to build better, faster browser applications! We'll talk about chrome://tracing, the built-in JS profiler in DevTools, and much more.
-
Nodejs _ 2013-03-16
AssetsPack - a friend of the front-end developer (pack your assets with NodeJS)
AssetsPack is a NodeJS module which helps in organization, compilation and minification of assets. It's meant to be used in local environment during the development process. It was made generally for HTML/CSS/JavaScript based applications.
-
JavaScript _ 2012-08-22
JSConf 2012 (videos)
Today is a day for posting videos. Another interesting conference - JSConf 2012. The videos are available here http://2012.jsconf.us/.
-
PHP _ 2012-02-12
MySQL vs JSON file data storing
I'm not exactly a performance perfectionist, but currently I'm working on a tool which will be used in a large system. It will deliver texts to a multi-language environment and there will be several sites/apps which will performe big amount of request to it. It is the right moment for me to choose how to speed up my code and the work of the tool overall.
-
Inspiration _ 2011-12-21
The powerful rendering opportunities of the modern browsers
Are you wondering what you can do with Canvas and WebGL. Check http://mrdoob.github.com/three.js/ to find out.
-
JavaScript _ 2011-09-11
JSConf.eu 2011
The European JavaScript conference is really close. It's scheduled for 01 and 02 of October. I wish I could be there. I hope that the videos from the lectures will be shared online, as this happened for the last year. I strongly recommend to watch them. There are available here http://blip.tv/jsconfeu.
-
PHP _ 2011-05-26
\"This page contains both secure and non secure items\" message
When you are opening a site via https protocol and there are items loaded with absolute addresses started with http some browsers, like IE, throw a message This page contains both secure and non-secure items. It is really annoying and if the user decides to can prevent these items of showing and he can brake the whole layout or some functionality.
-
ActionScript _ 2011-04-02
AS3: converting XML to JSON object
I'm absolutely sure that you are using external data in your flash/flex applications. It is a good practice to transfer information in XML format. Most of the projects that I'm working on also use XML and in most of them I have a class that converts the data to JSON object. The problem with this workflow is that the parser's logic is always different because the XML is different. These days I wrote a class that solved this problem and directly converted every given XML file to a JSON object.
-
PHP _ 2010-12-30
PHP: Simple javascript obfuscator (merging files)
Currently I'm working on a big JavaScript project. It has a lot of files that have to be compressed. I wrote a simple php class that merges all the files into one. It has also a useful simple obfuscator method.
-
ActionScript _ 2010-12-15
Change the quality of all the bitmaps of your flash document
-
ActionScript _ 2010-02-26
Embed fonts in all the text fields of your flash document
Very helpful solution that will save you maybe several hours. I used JSFL language and very short script to parse all the items in the library. Then for every item just embed the characters that I wanted. Get the script from here http://www.outset.ws/files/jsfl/embedCharactersInTextField.jsfl. In flash: Commangs -> Run command (or simply Ctrl+R) and point the script file.You can download the jsfl documentation from here http://livedocs.adobe.com/flash/9.0/main/flash_cs3_extending.pdf.