Home » JavaScript (page 59)

JavaScript

JavaScript String Compare example

A very common operation for most developers is String Compare, be the language they use JavaScript, C/C++, Java, whatever. To be honest, the programming language doesn’t even matter. At some point you will have to compare those strings. In this example we will learn how to do that using JavaScript. We will use: JavaScript Simple Comparison We will start by ...

Read More »

JavaScript Tutorial Through Katas: Mars Rover

A programming kata is an exercise which helps a programmer hone his skills through practice and repetition. The article assumes that the reader is familiar with the basic usage of JavaScript and Jasmine asserts and knows how to run them from his favorite IDE (ours is WebStorm or IntelliJ IDEA. Tests that prove that the solution is correct are displayed ...

Read More »

Getting started with JSON-P

I have during my college days used XMLHttpRequest object and its equivalent in Microsoft world to make Ajax calls and those Ajax calls were to the URL within the same domain. But with the advent of Webservices and whole lot of mashups being developed, Ajax calls are not restricted to same domain but the cut acorss different domains. When this ...

Read More »

Javascript copy to clipboard example

If you use any scripts for syntax highlighting, then you have seen that most of them have “copy to clipboard” as an option. And now you want to use that in your next project. But how? You don’t even need to worry, we’ve got you covered. Just follow along. We will use: Javascript Flash Zero Clipboard Copy to Clipboard in ...

Read More »

7 reasons to use Yeoman’s angular-fullstack generator

For my next project and, after looking for candidates and reading some hundreds of lines of documentation, I finally choose to work with the so called MEAN stack: mongodb, express, angular and node. As with any other technology ecosystem, the great number of frameworks, libraries and tools can make our choice a challenge, and JavaScript is not an exception. But for ...

Read More »

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 »