KeyNode with Node.js and Microsoft Azure

KeyNode is a application to issue and verify software license keys. Technology stack for KeyNode is Node.js, MongoDB and Microsoft Azure.

I had built this functionality with C9.io (a cloud-based IDE with a built-in source code repository and debugger), mongohq (MongoDB as a service – now part of compose.io) and appfog (Cloud PAAS built on top of CloudFoundry). It used SMTP/gmail to email license files. That was the version I created a couple of years ago to issue tamper-proof signed xml license files for CodeDemo (a code snippet tool for developers, presenters and instructors).

For KeyNode (open source) I switched to a different toolset : Visual Studio Code and Windows Azure, simplified the code to remove signed xml file and open-sourced it on GitHub. Signed xml allowed offline verification in CodeDemo (a Wpf/Desktop app). Removing signed xml requires verification to happen online. I am working on adding the web endpoint for verification of license keys. This version uses SendGrid to email license keys. KeyNode is deployed as a Windows Azure Web App. The Azure Web App is on Continuous Deployment feed from the source code repository on GitHub.

I created and tested this Node.js application locally without IIS and deployed it as an Azure Web App without making any changes to the code at all. Node.js applications are hosted in Azure under IIS with iisnode. Iisnode is a native IIS module that allows hosting of node.js applications in IIS on Windows. Read more about iisnode here. Iisnode architecture also makes it significantly easier to take advantages of scalability afforded by Azure.

KeyNode is a work in progress. My plan is to use this as the basis for further explorations in the following areas :

  • DevOps, Docker and Microservices (at miniature scale of course!)
  • Create a Web UI with Express (a Node.js web application framework)
  • Integrate with Azure Storage/Queues
  • and more…

I invite you to check out the live site on Azure and fork it for your own experiments : KeyNode on GitHub.

Resources :

Photo Credit : Piano Keyboard (www.kpmalinowski.pl)

Extending Bootstrap – Book Review

Extending Bootstrap is a new Bootstrap book by Christoffer Niska, published by Packt Publishing. The publisher contacted me to review the book after reading my blog post about my experiences with Bootstrap and LESS. I am glad I accepted to do this book review. I learned several ways to extend and use Bootstrap by reading this book.

The book is for intermediate to advanced level users of Bootstrap. It is a quick and to-the-point read. It may feel opinionated to some readers. It is a concise distillation of author’s real-world experience with the current state of the Bootstrap technology. It is perfect for individuals and teams who are looking to go beyond the basics with Bootstrap on their projects.

It is important to know that you will need to install XAMPP server and Node.js to follow along with some examples. Node is only needed for the steps needed to compile LESS style-sheets. For all other steps you can use Site44, or other ways to render your html and css. You might be able to use hosted node on C9.io to get the feel for the steps that require node, without having to mess around with a web server and node installation.

As you take your Bootstrap project to the next level, you will need a way to automate LESS compilation. Remember, you don’t want to use runtime LESS compilation in production due the performance hit it entails. Using RECESS and Grunt is probably the best way to compile/automate style-sheets, and this is what the author recommends. There are other ways to accomplish this automation, but it is good to know how to use these tools, regardless.

The book does a good job of describing how to customize javascript plugins that come bundled with Bootstrap with a clear and clean example, as well as enumerating the reasons to customize. The example used to extend a plugin in Chapter 6 is reusable. It is actually a template that you can use to create your own extensions to Bootstrap plugins. The step by step explanation of the extension is very instructive. Awesome!

The instructions to disable responsiveness in Chapter 7 should have some more explanation, in my opinion. Granted, that the book is intended for advanced users, but these instructions to remove some lines here and add some lines there, may feel a bit arbitrary to a user who may want to understand the reasoning behind these steps.

Chapter 8 is a listing of popular custom Bootstrap plugins that can be useful to you in your own projects. The listing describes the functionality exposed by the plugins. It does not go in-depth or into the internals of how the plugins work. If you need the functionality provided by these plugins, this information can save you valuable time you might otherwise waste looking for and trying less than optimal candidates.

Chapter 9 gives you a starting point for creating your own Bootstrap theme on top of Bootswatch.

All chapters follow the format of explaining the reasons why you might want to do things described in the chapter, and only then getting into the details and explanation of the steps. I would like to mention this again – this is a thin volume but packs a solid punch. It does not have very in-depth technical explanations. It does have the information you need to get started with taking your Bootstrap project to the next level. The book is an enjoyable read and flows very naturally. You can also use it to create a checklist of things to do when customizing your Bootstrap project.