December 16th, 2017
Learning MongoDB Part II: Working with Documents
Today I'm building on my first MongoDB discovery and looking at documents in more depth. To start, let's implement Christmas tree purchases in the database. The first task is picking a tree to buy! I searched the database for a tree I liked and used the
findOne() function to return a single tree.
Next I created a customer collection to hold all the people who bought trees:
December 27th, 2017
Learning MongoDB Part IV: Aggregation Framework
For more complex queries and data manipulation in MongoDB, we can use the aggregation framework. First introduced in MongoDB V2.2 (the current version as of this writing is V3.6) the aggregation framework creates a pipeline of operations to perform on documents1. Pipelines support operations such as sorting, filtering, and grouping documents similar to a SQL
GROUP BY clause. Pipelines also enable grouped data manipulation, creating entirely new collections in the process. I used the tree database from my first and second MongoDB discoveries to explore the aggregation framework.
If you remember from my previous posts, each tree has a type and a grade which specifies the height of the tree. One piece of information I'm curious about is the total number of trees in each grade with type frazier fir. The aggregation function to answer my question is written like so:
December 15th, 2017
Learning MongoDB Part I: Creating the Database
December 23rd, 2017
Learning MongoDB Part III: Arrays and Nested Objects
One of the really powerful things about a document database like MongoDB is the ability to store arrays of values in a document. Arrays can even store sub-documents, allowing for many levels of nested data.
An example use case of an array in a document database is a user with multiple addresses. In a relational database, this address information would be stored in a separate table. To get a users addresses, the addresses table would be joined with the users table. In MongoDB, a user and their addresses can be stored in one document, making data access and updates quick and easy (with no expensive
December 30th, 2017
Creating a Node.js and MongoDB REST API Prototype
All of this knowledge buildup is for a personal website project that I have planned (and where this blog will call home!). Before I start development on the website directly, I will create a series of prototypes to get a feel for some of the technologies I will use in my websites stack. With these prototypes I can make sure the technology I choose is a good fit for the full project. Also I can use them as templates to complete future discoveries! In general if you have the time to build prototypes with technologies you want to use in a production project it is a great idea!
March 17th, 2018
Creating a MEAN Stack Prototype
Much of my work lately has been in preparation for a personal website that I'm going to build (and where this blog post will call home!). The website is going to contain my resume, blog posts, and more. I am really excited to get started building it!
July 3rd, 2021
Exploring AWS DynamoDB
DynamoDB is a NoSQL database on AWS specializing in key-value and document storage. DynamoDB is fully managed by AWS, meaning users don't need to provision any servers for it to run on. I often compare DynamoDB to MongoDB, due to their similar functionality and JSON document/item structure.
Recently, DynamoDB has come up quite a bit in engineering conversations I've had in relation to building cloud native applications. I wrote a series of articles on MongoDB in 2017 while I was prototyping with the database. Recently I did the same with DynamoDB, creating a sample DynamoDB table with Terraform and using AWS SDKs to modify and test its contents. This article discusses what I've learned about DynamoDB and showcases my prototype code.
March 9th, 2018
What I Learned About TravisCI
My MEAN stack prototype is the first personal project that uses Continuous Integration (CI). Continuous Integration is great and I will likely use it in all future projects.
So what is CI? Continuous Integration is the practice of merging code in development into a main repository on a regular basis. On each of these merges, testing suites and builds are executed automatically by a tool separate from the main codebase1. This allows for early detection of bugs and helps avoid the nightmare of backtracking through many commits to see where some functionality broke. With CI each time a commit is made the developer knows if any existing code broke. Of course this requires some thorough testing suites to be created (something I often cut corners on admittedly).
January 6th, 2018
Angular 5 First Impressions
May 31st, 2018
React & Webpack Seed Project Part I: Building With React
Since mid March a lot of my free time work has been dedicated to building React.js apps. In fact, I built this website in the past month and a half with the MERN stack - MongoDB, Express, React and Node.js. Before I started building this website I built a sample prototype application using two key technologies - React and Webpack. The knowledge I learned from this prototype helped jump start my work on the website. This discovery looks at the first technology used in the prototype application - React. I will look at the Webpack portion of the prototype in my next discovery post.