Tag Archives: Software Sagacity

Node.js – Adding comments to JSON files

Node.jsDue to its tight coupling and interoperability with JavaScript, JSON has become the standard data transfer format for most JavaScript and Node.js applications. As opposed to its primary competitor format XML, JSON is much more compact and efficient for data transfer, and has a direct one-to-one mapping with the memory structures in the code. What JSON doesn’t enable, however, are comments in the JSON files.
Continue reading

RSS Twitter LinkedIn Facebook Email

C# Design Patterns: #1 – The Singleton

SingletonThe Singleton is one of the simpler design patterns. As the name suggests, the Singleton creates a single, static, globally accessible class. It is an alternative to global variables and static classes, each which come with their own limitations.

Singletons are excellent areas to store global information, such as database connection strings, system paths, and parsed XML configurations. In addition, Singletons can be used to store global image caches so that images can be shared between functions.
Continue reading

RSS Twitter LinkedIn Facebook Email