Continuous Code Validation using JSLint

Callbacks are often found in JavaScript code. Some say ‘They are inconvenient and make code harder to understand’. Actually, it is a matter of habit and JS code may be as readable and easy to understand as any other. Additionally, this approach of coding allow us to ‘release’ program flow. No function is waiting for another’s result. Everything goes like stream.
Few month ago there was buzz around Node.js: Google’s V8 JavaScript engine acting as server. Before that nobody thought about event-based programming on server side. Every I/O operation in Node.js is asynchronous (database queries, reading from file or fetching content of some webpage). These are all the time used in web applications, especially real-time ones. Besides, lightweight and high-performance Nginx server is using event model.
There is enough articles about Node.js functioning. Today, I’ll show how to create real application that is checking in continuous way if our code project in JSLint by Douglas Crockford. All with growl notifications.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
June 15, 2010 in Guides, JavaScript, Programming, Server Side | View Comments
10 steps to make your site cacheable
If your startup is relatively new and doesn’t take much network traffic, there’s probably no reason to be interested in caching. The problem arises when users begin to complain about the time to load several pages. Well, users hate waiting. If you care about their convenience or you are curious about caching this article is especially for you. Read entire post »
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
April 2, 2010 in Guides, Web Development | View Comments
Unit Testing in JavaScript. QUnit
If you are not familiar with definition of Unit Testing or you are wondering about solutions in JavaScript go to one of my previous articles.
The first type of JavaScript unit test frameworks are solutions like JSSpec or QUnit. They are written entirely in JavaScript and require a browser to run . The undoubted advantage of these solutions is an amazing simplicity of writing tests. But if we want them to run in different browsers, we are forced to do it manually. Unfortunately without some tricks we can’t run them from console, nor at once in different browsers or computers. However, there are adapters that let you to extend their functionality. Famed examples are JsTestDriver, Test Swarm and Selenium. Thanks to them we are able to control multiple browsers on multiple computers from one place. Anyway, I will describe them in future. Today we’ll take care of the basics.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
March 20, 2010 in Guides, JavaScript, Programming, Unit Testing | View Comments
Unit Testing in JavaScript. Introduction
JavaScript is mainly (but not only!) clientside language. Therefore it poses some problems for developers who use unit testing in their projects. I’m going to point out most of them and solve bit by bit in next articles. If you don’t need explanation of this term itself, proceed right to the JavaScript Issues title.
Unit Testing
In short: We’re writing tests for our application which are independent of each other. We may quickly execute set of them as we modify the code. The new application is error-free if all go positively.
Unit Testing is connected with Agile methodology and techniques of producing a software such as Extreme Programming (XP) or Test-driven development (TDD). They assume that changes in application should be made frequently and in small portions. Unfortunately, it’s equivalent to frequent errors. Thanks to Unit Testing we are able to detect them rapidly.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
March 14, 2010 in Guides, JavaScript, Unit Testing | View Comments









