The EJS templating engine is one of the more effective ways to render HTML from Node / Express.js. With an HTML syntax and simple tags for including server-side JavaScript, EJS combines the best of both HTML and Node. While other templating engines such as Handlebars.js can also work with HTML, the EJS format is particularly flexible by enabling the full capability of the JavaScript interpreter in the template body.
Continue reading
Multiple SSL Certificates on One IP Address
Whether due to network configuration requirements or load-balancing, configuring multiple SSL sites on a single IP address can often provide more flexibility and ease of maintenance. The challenge with the implementation is that older browsers can only interact with one SSL site per IP address on port 443. Addressing this problem are two primary solutions: port redirects and virtual directories.
Continue reading
C# Design Patterns: #7 – Bridge
The Bridge pattern is ideal for building cross-platform applications. By completely separating the class interface from the implementation, programs can interchange the actual implementation of a particular subsystem without requiring any changes in other parts of the code.
Continue reading
Could Windows Servers Be More Secure than Linux?
Over the past fifteen years, Linux has built its brand around security and flexibility. The open source community and many technology aficionados berate Windows for its security flaws, and hail Linux and Apple as the platforms for serious, reliable computing. Few serious studies have rigorously compared the platforms in the wild, and those that do are often accused of bias. Temporarily setting aside the prejudice that most have regarding the issue, could it be possible that in certain instances, Windows Servers are indeed more secure than Linux?
Continue reading
Implementing Object-level Inheritance in Node.js
Prototype-based classes in JavaScript and Node.js bring a high level of flexibility to the software architecture. Since objects and classes are fully editable at any point in program operation, the functionality can be extended to implement object-level inheritance at runtime.
Continue reading
C# Design Patterns: #6 – Adapter
The Adapter pattern helps provide a better way to leverage existing code. Instead of requiring the developer to redesign components from scratch, the Adapter can integrate work from previous projects or other libraries.
Continue reading
Creating Custom UDL User Defined Languages in Notepad++
The Notepad++ editor is the Swiss Army knife of text editing. With hundreds of plugins, the tool can be configured as an editor to almost any development workflow. In the previous post, we reviewed how to add comments to a JSON configuration file. We will now create a custom editor that supports those comments and the custom configuration keywords.
Continue reading
Node.js – Adding comments to JSON files
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
Node.js – Passing Arrays in the Querystring
One of the enticing attributes of Node.js development is the high level of flexibility offered by the language. Whereas other web application frameworks often have more stringent and developed patterns for development tasks, Node is more of a Wild West, where the recommended implementation can be anyone’s game. One of those open-ended tasks is passing arrays through the Querystring.
Continue reading
PHP, Be Not Proud
Over the years, PHP has been instrumental to progress in the field of web development. As one of the early pioneers of server-side web scripting, the PHP language grew to become the dominant programming language of open-source web applications. Its free and open-source codebase made it the default programming language on Apache and Linux, and the large number of excellent web applications built on PHP will secure its existence for at least the next fifteen years.
Continue reading