Randomness
in Code
Universal / Isomorphic Web App
April 15, 2017

I've been working in the world of client side applications for a while now and have really enjoyed using React and Redux. Together their simplicity has allowed me to code in a very deterministic fashion, knowing that if my unit tests pass the page will render. Though working solely in the client has some limitations, and since we own the server it feels a waste to not take advantage of it when rendering pages. The most apparent example...

Components, Containers, and Test Apps
June 5, 2016

Web components aren't exactly new, but their use is becoming more widely accepted. We're no longer building pages with controllers and views that mix and match assets together, but rather seeing reusable components that separate pages share. Web developers are now being trained to draw boxes around parts of a page to build a sort of "Russian Doll" set of components. The idea of a component library for a suite of web applications is...

Testing Node on the Server and Angular on the Client
January 28, 2015

One of the most useful features of Angular, in my opinion, is the focus on testing your code. Structuring your apps to use dependency injection by default, along with an out-of-the-box solution for unit and integration tests, gives anyone a great head start in testing their client code. Using a similar solution on the server side, and wiring it all together with a tool like Grunt, provides you with complete testing of your web...

Bundling Production Assets for MEAN.JS
November 19, 2014

Lately, I've been writing a lot of Angular on the client side and Node on the server side. More specifically, I've been using the MEAN.JS template in projects I create, which helps layout a structure to organize the code. Yes, there's a lot of bloat that comes with some of these template projects (and especially with the generators), but once it's all cleaned up and tailored to your project, I think it works very well.One of the best...

Creating a Private npm Registry with Sinopia
May 10, 2014

Those who use Node.js at work will sooner or later run into the issue of internal packages. Yes, you could keep all your internal code within a single project, or yes, you could reference your dependencies as GitHub repos in the package.json file, but neither are very elegant solutions. Recommended alternatives for this include cloning the entire npm repository, or using a proxy, similar to that of npm-delegate or Kappa. In addition,...

Authenticated Model: A Strategy for Secure APIs in Backbone.js
February 13, 2014

As I've been using Backbone more and more to create web applications, I've found the need for a security pattern increasingly important. Early on perhaps most of your server side APIs are unsecure, requiring no sort of authentication to access the resources that they expose. But certainly there will be a set of resources at some point which require a layer of security to ensure that not just anyone can access, modify, or delete these...

Multivariate (A/B) Testing
December 9, 2013

In web application development, testing the source code to verify it correctly produces the features required is a common practice. Developers will often write tests to validate that the code written satisfies the requirement originally set during the initial design of the feature. This same mindset should exist not just during development, but early in the design of the web application itself, to verify the product is something people...

Using Spring to Model Data and Build REST Endpoints, with XML-less Configuration
September 23, 2013

Web applications have been built for years, and Java has often been a top choice as a technology platform. However, the act of using Java to build a web application can feel quite laborious at times with all the duplication and excessive configuration necessary to stand one up. Java EE hasn't had the best reputation for an easily understood web platform, and it's because of this that outside frameworks have emerged attempting to fix this...

Java Logging: Creating, Indexing, and Monitoring
August 27, 2013

Most everyone who has developed an application is familiar with logging. Creating log messages to debug potential problems of the future is a great way to make your life easier. Figuring out how to effectively handle an ever-increasing log file, and more importantly, know when your customers encounter problems through those logs is a more difficult issue. As a developer, monitoring your application can be something that does not come...

Minify Assets using Grunt
August 13, 2013

Development of any project naturally leads to more and more code as you increase the capabilities of your application. On the server side, this leads to larger compile/build times, and a larger deliverable to servers which host your code. But the difference between a 1MB deliverable and a 100MB deliverable is negligible, since the transfer of that application is done internally, and only to those few server machines. On the client side...

JavaScript UI Testing with Zombie.js
July 26, 2013

Unit tests can be great to verify your source code, but there are times when integration tests provide a more useful report on the stability of your application. Yes, integration tests (most likely) require more setup than unit tests, and yes, they will (again, most likely) test things outside of the code you wrote. But they also come with a huge upside in that they test what your customers will use — the end product stack. And...

Continuous Integration with Jenkins and Node.js
June 21, 2013

A while ago, I wrote about how you can use Travis-CI for your open source project. And while that works great for open source projects, it's not nearly as free for private repositories as it is for public ones. So if you have a private GitHub repo, or are using GitHub enterprise at a company, what are you to do? You could pay for the use of Travis-CI (which I'm sure would be great if you have the option), but if not, there's always...

Socket.IO
May 26, 2013

Moving logic from the server to the client is becoming more and more common. But as more moves, the difficulty of keeping everything in sync increases. Providing REST endpoints on the server side for the clients to consume is a great pattern, however that's more of a pull model than a push model. If your data is changing but your clients don't know about it, the users are seeing stale information. Keeping the data updated real-time...

Backbone Revisited
April 19, 2013

In the Fall of last year, I picked up Backbone.js with the hopes of writing a couple front end applications to better understand how it worked. The amount of differences between the client side MVC frameworks and those on the server side turned out to be enough to make me step back, and choose a entry point that would allow me to focus on the very basics of Backbone. This helped me grasp the bare essentials of the framework, and I wrote...

Node Version Manager (NVM)
April 13, 2013

Node.js has a great package manager to manage the dependencies of your Node projects, but what about managing the versions of Node itself? Ruby has a version manager called RVM that most folks in the community know to use right from the start. I've installed Node, like most others, using the default installer provided by Node. This (more than likely) requires sudo access because of where the default install location resides, and...

Hot Embers? First Take at Ember.js (ember-counter)
March 27, 2013

I've been keeping track of Ember.js for a while now, and from what the creators have been saying about the technology, it's hard not to if its truly going to be as good of a solution as they've claimed. Right out of the gate, Ember stresses its a full "top-to-bottom" solution that will address all the...

Using Travis Continuous Integration for your Open Source project
March 21, 2013

I'm a big fan of Continuous Integration in software projects. My background in Java introduced me to this early on with Hudson (now Jenkins), a great tool to build your Maven based Java project, run your unit tests, and publish your build to the Maven repo. Browsing GitHub projects, I've seen tons of...

less-middleware: using LESS with node.js
March 16, 2013

LESS is a great way to write CSS, allowing you to use variables, nested rules, mixins, and many other useful features. If nothing else, I think it helps you better organize your CSS. Recently I've been playing around with Node.js, and wanted to use the less-middleware package so that I could easily use...

Two Tech Stacks, Two Backbone Apps
March 9, 2013

I've recently come across two well written blog posts from two separate companies detailing their technology stacks. Working at a technology company myself, I find these articles fascinating, because they outline decisions and tradeoffs they've had to make along the way. What's fun is finding some that...

Debugging Node
March 6, 2013

A debugger for me, is a necessity. Going back to the days of print statements to debug seems like something I never want to do. And with debuggers coming a dime a dozen in the Java world, this is really something we must have if switching to run JavaScript on the server. Chrome's debugger is certainly...

reveal.js - HTML Presentations
February 20, 2013

A few of my coworkers have recently shown me reveal.js, and it's quite amazing. If you have to make a presentation, the first thing everyone thinks is PowerPoint. But if we're working in the web why don't we make presentations on the web? That's where reveal.js comes in, and every time I see a...

GitHub Pages + JavaScript = Awesome
February 2, 2013

One of the coolest things I've learned of recently is GitHub Pages. GitHub hosts most of the world's code by now, and could just sit back and do nothing, but they constantly keep updating and improving things (have you looked at Gists recently?). With GitHub Pages, anything you put in your "gh-pages"...

My introduction to Backbone.js (backbone-counter)
January 10, 2013

My background is on the server side of things, but recently I've been heavily involved in the client side. And one of the main players in that realm is Backbone.js. For those who don't know, Backbone attempts to serve as a client side MVC framework but really I believe is more of a library than a...