Dropwizard Deep Dive – Part 3: Multitenancy

Hello once again! This is Part 3 of a three-part series on extending Dropwizard to have custom authentication, authorization, and multitenancy. In Part 1, we set up custom authentication in Dropwizard, and in Part 2, we extended that to have role-based authorization. For this final part, we are going to diverge slightly and tackle the related but different concept of multitenancy.
Read more on Dropwizard Deep Dive – Part 3: Multitenancy…

Dropwizard Deep Dive – Part 2: Authorization

Welcome back! This is Part 2 of a three-part series on extending Dropwizard to have custom authentication, authorization, and multitenancy. In Part 1, we set up custom authentication. When we left off, we had just used the Java annotations @RolesAllowed and @PermitAll to authenticate our resource methods, so they will only run for credentialed users. In this part, we’ll cover Dropwizard authorization. We are going to extend the code we added to check the role assigned to a user and further restrict our methods based on whether that matches.
Read more on Dropwizard Deep Dive – Part 2: Authorization…

Take Your Emacs to the Next Level by Writing Custom Packages

I wrote recently about using Emacs as a JavaScript development environment. One of my chief complaints was the inability to easily run JavaScript tests from within Emacs. I practice TDD frequently, and having to context-switch out of the editor I’m using to run tests is a big annoyance for me.

I knew it was possible to do what I wanted from within Emacs, as evidenced by other test runner modes like RSpec-mode. Armed with that knowledge, I decided to go through the process of learning enough Emacs Lisp to make a Mocha test runner. In the process, I learned a lot about developing Emacs packages and ended up with a really useful tool, so I thought I would share some of the things I learned.
Read more on Take Your Emacs to the Next Level by Writing Custom Packages…

Up Your Logging Game with Improved Log Management Tools

Are you still using plain text files to collect logs for your application? I was too until recently, but no more. While plain text logging is simple, it has a number of limitations. The good news is there are a number of superior logging alternatives available, including two that I have used personally—Loggly and Graylog. Read more on Up Your Logging Game with Improved Log Management Tools…

Bye-Bye, Sinon – Hello, testdouble

UPDATE: Justin Searls, the author of testdouble.js sent me an email with some notes on this post.
I’ve added some his comments below to provide some additional context.

I’ve been working in JavaScript-land for the last little while, writing lots of Node.js code. Since I practice TDD, I’m always trying to keep my eye on the best new ways to test JavaScript code. Read more on Bye-Bye, Sinon – Hello, testdouble…

Emacs vs. WebStorm for Node.js Development

If you’ve ever worked with me, or read my blog posts, you know I am an Emacs junkie. Emacs is my first and last editor, and I’ll happily spend hours making it just the way I want it.

Lately though, I’ve been doing a lot of Node development and feeling some pain from using my favorite tool. I also recently ended a large Java project where I had been using IntelliJ as my editor, since it was much more advanced than anything Emacs could offer. Since I had been using IntelliJ and some other JetBrains products, I was aware of WebStorm, their IDE geared towards JavaScript development. Read more on Emacs vs. WebStorm for Node.js Development…

Using ES6 in Node.js

My team recently upgraded our Node version from 0.10 to 4.0 for a big app we are working on. Lots of improvements came in the upgrade, but by far, my favorite is all of the ES6 features now available natively in Node.

Just to be clear, Node 4.0 does not exhaustively support ES6. It implements a lot of the biggest new features, all incorporated from the upstream V8 engine. Getting all of these features–especially without having to set up up a build process with Babel or another compiler–has been a huge win for our team. We’ve been able to write cleaner, better JavaScript, and we’ve been gradually refactoring our app to use the new ES6 features. Read more on Using ES6 in Node.js…

Don’t Let Silos Ruin Your Software

Dividing up work is a natural and proven way to solve most problems faster. Specialization is also common, especially in areas that demand a range of skills too broad for anyone to master fully. Both of these approaches can be useful, but just like ammonia and bleach, if you aren’t careful to keep them separate, bad things can happen. I’m talking about the dreaded silo, the bane of engineering projects. Read more on Don’t Let Silos Ruin Your Software…

Serving Remote PDF Files with Node.js and Express

Recently, I got my first exposure to Node.js by working on a small Express web app for a client. One of the things the app needed to do was forward PDF files from another web service to a browser. The task seems quite simple: Just make an HTTP request for the data, then serve the same bytes through our endpoint. However, I ran into a couple of sticky points when loading the PDF data over HTTP and serving correctly to the user, so I thought I would whip up a quick tutorial on how to do it right.
Read more on Serving Remote PDF Files with Node.js and Express…