Home » JavaScript (page 59)

JavaScript

Static code analysis for free

Although JavaScript might be the world’s most misunderstood language, it is now among the most popular and most used ones. Thus you should also treat it as such. Meaning, to properly structure your frontend, apply code linters, automated testing… The available tools make that even easier than you might think. You can’t control what you can’t measure Tom DeMarco A ...

Read More »

Templating in Javascript

In the last few weeks I was doing some work with client side templates. Since most of the webbies seemed to be unfamiliar with the concept and had a wee bit of bother wrapping their heads around it, here’s a short explanation of the whole idea. Code for this post can be downloaded here or seen here. Formatting output with ...

Read More »

Single Page Apps

Single Page Apps are becoming increasingly popular as the demand for highly responsive apps is increasing. We could be using Ajax and Javascript to do this, but we will be using Angular as it is a structural framework for dynamic web-apps, efficient and easy to use, as described by the people who built it. We’re going to create a simple ...

Read More »

Why should we use server side in Backbone.js?

One of the challenges when building nontrivial Web applications is that JavaScript’s non-directive nature can initially lead to a lack of structure in your code. JavaScript is often written as a free-hanging and unrelated blocks of code, and it doesn’t take long before it becomes hard to make sense of the logic and organization of your own code. This becomes ...

Read More »

Unit Test AngularJS Controller With Jasmine

Last time I demonstrated how to Consume RESTful API With Angular-HAL, and now I want to show you how to unit test my AngularJS controller code withJasmine, a behavior-driven development framework for testing JavaScript code. BDD and Jasmine I’m a big fan of Test-Driven Development (TDD). And I always want to write unit test for my code. But not everyone ...

Read More »

First baby steps with Angular.js

This article outlines some of my notes of a webinar about Angular.js I recently participated at. These are really just “baby steps” in that it covers the very basics that might help to get started. Since these are really my first steps with Angular, I might have misunderstood some of the stuff. So feel free to help me improve this ...

Read More »

Multi module JavaScript project with Grunt

Writing blog post how I managed to configure multi module JavaScript project with Grunt for my spare time project. It is using Protractor for end-to-end testing, but I believe that this multi module approach would be easily portable onto non-Angular stack. In my spare time I work on pet project based on EAN stack (Express, Angular, Node.JS). (Project doesn’t need ...

Read More »

Boot your ajax app: Creating a splash screen with NProgress

While single-page JavaScript apps tend to be more dynamic and usually more interactive from the user point of view, they also most often have a longer startup time compared to more classic, server-side rendered apps. That’s usually where progress indicators and splash screens come into play. Obviously, the focus should clearly lie in optimizing the startup time to the maximum ...

Read More »

Things I learned creating a jQuery Plugin (Part II)

This post is the continuation of the series Things I learned creating a jQuery Plugin. In the first part we have seen how the structure of a jQuery plugin must be, the plugin entry point (so called wrapper function) and how we can control the behavior of a method as a getter or setter. Define default options Your plugin more probably will accept ...

Read More »