For this post I am going to discuss two of my favorites things: servers and modularity. Server design is an important skill for full stack developers and good server design can save a lot of time finding and fixing bugs. I recently started a personal project and, because I am anticipating some complexity on the backend, I decided to use a modular approach for my server. Lets look at each module and examine what it does.
JavaScript Event Systems Unraveled
Events are an extremely useful aspect of many JavaScript frameworks, but their functionality can seem bizarre if you don’t know what’s going on under the hood. In this blog post I will explain the inner workings of an event system, in particular how it can function as part of a system of classes. Because this explanation involves some discussion of classes you should definitely read my blog post on JavaScript subclasses first if you are unclear about that subject.
Turning a Prefix Tree Into a Compression Algorithm
My last post talked about the prefix-tree and went over some basic concepts and implementation. In this post I will explain how I turned a simple prefix-tree into an algorithm for efficiently storing long strings. If you want more info about the basic functionality of a prefix-tree take a look at my previous post or at the github repo.
What Is a Compact Prefix Tree?
There are a lot of data-structures out there and sometimes it can be hard to figure out what is worth learning or, even more important, what is useful for a given application. The compact prefix tree is a data-structure that I discovered recently and that I think it is interesting, fun to implement, and potentially very useful for a range of applications. In this post I will go over the basic implementation and uses of the compact prefix tree.
JavaScript Subclasses the Right Way
There is a lot of misinformation on the web about making classes and subclasses in JavaScript. Since the right way is both simple and logical, clearing the air about this issue will not be hard. The problem we face has three steps…
How to Integrate an App With Mongoose
This is the second of two posts about my mongoose plugin category-tree. In the last post we looked at an algorithm that finds a path to a leaf node through a tree of categories. With that step done, we need to apply the path to the correct properties of the document before it is saved to the database. This post explains how I integrated my app with mongoose so that it is called every time a document is saved.
How to Find a Path Through a Tree With JavaScript
This is the first of two blog posts about my mongoose plugin category-tree. The plugin is designed to automate save a series of hierarchical catagories by passing the most specific category to the save callback when saving an item to the database.