tag : JavaScript

Plugging Into Socket.IO: Advanced

Last week, we looked at the basics of using Socket.IO. As we went through that, we discovered that Socket.IO affords us a very simple API based entirely off of sending and receiving messages and being notified of those messages through events. Well, there’s more to Socket.IO than that. It has several advanced features that can come in very handy in certain situations.

Plugging Into Socket.IO: The Basics

WebSockets are starting to become available in more and more browsers. In fact, at this point in time, pretty much the latest version of every browser supports it according to Can I Use. The best part, though, is that you don’t even need a modern browser with WebSockets available in order to utilize the real-time back-and-forth communication between the browser and server that it offers. Socket.IO will show you how it’s done.

Optimize Your Workflow: JavaScript Tools and Libraries

The “good old days” are behind us. We no longer have the luxury of having so little JavaScript code that we can do it all by hand in Notepad. In fact, the amount of JavaScript being sent to the client per page has increased quite dramatically from not so long ago. We can’t afford to write everything by hand anymore, which is where all of these tools and libraries come in handy.

JavaScript Prototypal Inheritance and What ES6 Classes Have to Say About It

Many people come to JavaScript from other object-oriented programming languages such as Java or C++ and are confused as heck. “Where are the classes?” Well JavaScript doesn’t have classes. Rather, JavaScript uses prototypal inheritance to create something similar to classes. Though it is somewhat similar, it’s still quite different and takes a lot of work to understand. That’s the purpose of ES6 Classes.

JavaScript Fundamentals: Variables

I have never heard of a language that doesn’t use variables, and JavaScript is definitely not an exception to that. Variables are handled differently in each language and to become a true JavaScript expert you’ll need to understand how JavaScript handles variables too. For the most part it’s very straightforward, but there are plenty of “gotchas” you’ll want to be aware of.

Delay Initialization With jQuery Delegation

As the internet fills with more and more JavaScript code, we need to become more and more aware of the impact our code has on performance. One of the big pain points can come from all of your code being initialized and loaded during jQuery.ready() or (if you’re a good boy who puts all the code at the end of the document) right away. We can delay some initialization until later, right?

2 JavaScript Resources You May Have Never Seen

The internet is full of great JavaScript resources, many of which I’m sure are well known by a large portion of the JavaScript developer community. There are, however, a few places that are especially good but go unnoticed by the majority of the world. Here, I wish to bring to light two of those resources in the hopes that their efforts would affect the community in a more substantial way.

JavaScript Fundamentals: Functions

In JavaScript, functions are an integral part of development. They are what contain all of our amazing functionality (hence the name function) and run it whenever we deem worthy. With functions we can make code nonlinear, more organized, and easier to understand. We can also do some crazy stuff with functional programming.

JavaScript Fundamentals: Objects

JavaScript is an interesting language. It is quite different from any other language I’ve used, and it takes a while to really notice and understand the nuances if you don’t have a good way of learning. I’ve decided to start a Fundamentals series to help push the more basic knowledge out to a wider public, since I’ve noticed many non-expert JavaScript programmers frequenting the blog. Today, we’ll start with Objects.

MarionetteJS: Better Backbone Apps

Backbone.js introduced us to a more modular way of developing today’s web applications by separating our code into semantic and reusable pieces. Backbone’s main crutch was that it offered only the bare minimum so that it was easy to learn and didn’t force you to do anything that you didn’t want to do, but we were left on our own to figure out how to handle much of the implementation details. Marionette is here to help with that.