Due 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
Tag Archives: Software Sagacity
C# Design Patterns: #5 – Builder
The Builder pattern is a narrowly-focused pattern that enables incremental creation of new products. This pattern, though limited in application, when applied correctly, brings significant power and flexibility.
The guiding concept behind the Builder pattern is separation of the actual “building” of an product from its design plan. The prototypical example of the builder pattern is saving files to multiple formats. If an application allows saving files to different formats, it will have an internal representation of the data, and will need to “build” different formats dynamically from the same source object.
Continue reading
C#.NET and OpenXML DocX Text Replacement
The OpenXML DocX format in Microsoft Word offers a new, accessible format for manipulating documents. Whereas the previous “doc” format was proprietary, the new “docx” format directly exposes XML source files, enabling developers to generate dynamic Word documents, or directly edit their content. This brings opportunity for exciting tools such as text replacement algorithms and native mail-merge. Along with the opportunities, however, come several challenges and caveats that need to be handled in development.
Continue reading