As I mentioned in a previous tutorial, I’m a big fan of Netlify and the services they offer developers—my favorite of their services being their static website hosting and serverless functions. When combining the two, you can deploy a complex website or web application with a back end, without ever worrying about infrastructure or potentially complex API design.
So how does that work with a database like MongoDB?
If you’ve ever dabbled with serverless functions before, you might be aware that they are not always available for consumption. Many serverless functions exist for a defined amount of time and then are shut down until they are executed again. With this in mind, the connection to a database might not always be available like it would be in an application built with Express Framework, for example. You could establish a connection every time a function is called, but then you risk too many connections, which might overload your database.
So what do you do?
In this tutorial, we’re going to see how to build and deploy a simple web application using Netlify Functions and MongoDB Atlas. For this particular tutorial, we’ll be using the Node.js driver for MongoDB, but both Netlify and MongoDB support the use of other languages and drivers as well.
Read MoreEver since studying and working with databases 6 months ago, I’ve become fascinated with SQL and its relatively simple syntax. As a guide to the reader, I’ve gathered the essential criteria that employers expect you to know when applying for a database-related job.
In this blog, I will cover what SQL is, its different flavors and syntactical differences centered around an example query, the importance of EXPLAIN and SQL query runtime, and finally some example problems specifically in MySQL.
Read MoreIf you’ve been keeping up with my series of tutorials around .NET Core and MongoDB, you’ll likely remember that we explored using the Find operator to query for documents as well as an aggregation pipeline. Neither of these previously explored subjects are too difficult, but depending on what you’re trying to accomplish, they could be a little messy. Not to mention, they aren’t necessarily “the .NET way” of doing business.
This is where LINQ comes into the mix of things!
With Language Integrated Queries (LINQ), we can use an established and well known C# syntax to work with our MongoDB documents and data.
In this tutorial, we’re going to look at a few LINQ queries, some as a replacement to simple queries using the MongoDB Query API and others as a replacement to more complicated aggregation pipelines.
Read MoreI’m a huge fan of static generated websites! From a personal level, I have The Polyglot Developer, Poké Trainer Nic, and The Tracy Developer Meetup, all three of which are static generated websites built with either Hugo or Eleventy. In addition to being static generated, all three are hosted on Netlify.
I didn’t start with a static generator though. I started on WordPress, so when I made the switch to static HTML, I got a lot of benefits, but I ended up with one big loss. The comments of my site, which were once stored in a database and loaded on-demand, didn’t have a home.
Fast forward to now, we have options!
In this tutorial, we’re going to look at maintaining a static generated website on Netlify with Eleventy, but the big thing here is that we’re going to see how to have comments for each of our blog pages.
Read MoreIf you’ve been keeping up with my .NET Core series on MongoDB, you’ll remember that we explored creating a simple console application as well as building a RESTful API with basic CRUD support. In both examples, we used basic filters when interacting with MongoDB from our applications.
But what if we need to do something a bit more complex, like join data from two different MongoDB collections?
In this tutorial, we’re going to take a look at aggregation pipelines and some of the ways that you can work with them in a .NET Core application.
Read MoreIf you’ve been keeping up with my development content, you’ll remember that I recently wrote Build Your First .NET Core Application with MongoDB Atlas, which focused on building a console application that integrated with MongoDB. While there is a fit for MongoDB in console applications, many developers are going to find it more valuable in web applications.
In this tutorial, we’re going to expand upon the previous and create a RESTful API with endpoints that perform basic create, read, update, and delete (CRUD) operations against MongoDB Atlas.
Read MoreA few months ago you might remember a tutorial I put out regarding remote caching in Eleventy. In this tutorial titled, Download and Cache YouTube Data in an Eleventy Website with Simple JavaScript, I demonstrated how I was automatically gathering YouTube videos from a playlist on my Poké Trainer Nic channel and publishing them to my Eleventy website.
At the time, this was the best thing since sliced bread for that particular website. Fast forward to now and we’ve got a problem with too many videos loading all at once with a ten hour scroll to reach the bottom. The scroll time is an over exaggeration, but you get the idea that too much content on a single page can become a problem.
This lead me to pagination and showing only a small subset of videos per page.
We’re going to see how to very quickly add pagination to an Eleventy website, something that can be accomplished with a few lines of HTML and a few minutes of your time.
Read More