This is a post about my experience of completing the Free Code Camp Certification - APIs and Microservices ↗.
My certificate 👨🎓🐱🏍👇
According to the Free Code Camp website this certification is about 300 hours of work. There are 4 sections which need to be completed to earn the Free Code Camp APIs and Microservices certification. These sections are:
As you can see the fourth section is the part which takes up the majority of the 300 hours. This is self-directed learning. There is no hand holding. Well not much - but more about that later. Below is a quick run through of my experience of completing each of the sections.
Each section involves using a 🎏Glitch ↗ project, each have varying degrees of starter code within them, but which allow you to focus on the subject being taught at that moment.
Managing Packages with Npm permalink
Does anyone else always write 'nom' instead of 'npm', or is it only me!? 🥞
This section is an introduction to the 'package.json' file. This is a file which all node projects include.
If you don't know already NPM stands for Node Package Manager, and that's exactly what it is. It is a system which makes it easier to access Node packages (you can think of packages as groups of related code modules 'packaged' together, and then made easily accessible to other users for their projects).
This Stack Overflow answer ↗ sums it up quite well:
Shapes <- Package name
- Circle.js <-
- Rectangle.js <- Modules that belong to the Shapes package
- Square.js <-
The package.json file provides project-level control over which packages are being used and how. This section of the certification is fairly straightforward - there is no problem-solving to be done - but it is a great introduction into how a node project works.
Basic Node and Express permalink
This section mainly focuses on Express. Express is a web application framework for Node - more on this in a minute.
Next, Express. Express ↗ is a web application framework for Node. It's equivalent to Django in Python, or Laravel in PHP. These are essentially sets of pre-written code (in each respective language) which help to reduce complexity for developers while they are creating web apps. In other words web frameworks like express are a form of abstraction ↗ for every day developers.
I found it interesting to compare framework tag lines while writing this post:
Django: The Web Framework for Perfectionists with Deadlines Django ↗
Laravel: The PHP Framework for Web Artisans Laravel ↗
Express: Fast, unopinionated, minimalist web framework for Node.js Express ↗
'Unopinionated'... What does it mean for a web framework to be unopinionated? Good question. What this means is that Express does not mind how you complete your task - or put differently there are multiple ways to complete the same task and Express will allow them.
In contrast an opinionated web framework will often expect a particular task to be done in a particular way - and might make it more difficult to be done in a different way. Often this is because, in a specific domain, it makes much more sense to be done in this way. So 'opionated' does not equal restrictive or worse usually, just a tool for a specific job.
There is some more information on the MDN Node / Express tutorial page ↗, along with another great introduction to Node and Express.
The FreeCodeCamp tutorials focus on Express - which is great because a working knowledge of Express is enough to begin building web applications and (simple) APIs. The lessons covered include starting an express server, serving static files, creating routes, get parameter inputs from routes and queries, and parsing data sent via POST requests.
MongoDb and Mongoose permalink
In order to create an API, or a Microservice, which is truly useful you will need some form of storage, and a relatively straightforward way to access that storage. MongoDB is the former, and Mongoose the latter.
Even if the API is very simple, it could still be useful. For example a Cat image API would be useful to someone who wants cat photos on demand 🐱 ↗...
This section provides a good overview of them both, and runs you through some challenges which include writing code that follows best practices of using Mongo with Mongoose for web app storage.
For each the starter code is provided on Glitch, but honestly this is only to ensure while completing the challenge you don't get overwhelmed or held back by the details of implementation such as correctly configuring express.js, other dependencies and packages, and the design and aesthetics (all of which are important - but they quickly pile up and become too much to focus on for a learner).
My submission for each of the projects is embedded below - I won't go into detail about each one because this is already a long post. Some of these are more challenging than others - the exercise tracker probably has the most functionality attached to it, as well as needing the most complex database. They are all doable - all you need is to put in some time, research the right sites (some helpful links below), ask questions ↗, and don't give up!
If you read this and want to ask me specifics about any of the projects (or anything else) - send me a tweet 👋 ↗, as that's where I'm most likely to be, and follow me there too!
Helpful Links - Projects Below ⬇
MongoDB Docs ↗ Mongoose Docs ↗ Full Node & Express Tutorial - Mozilla ↗ FCC Forum - Topic about Exercise Tracker Project ↗ FCC Forum - Curriculum Help & Certification Projects ↗ Stack Overflow ↗ Google 😅 ↗
Timestamp Microservice permalink
z-timestamp.glitch.me ↗ - Link to project (embedded project below)
z-header-parse.glitch.me ↗ - Link to project (embedded project below)
URL Shortener Microservice permalink
z-link.glitch.me ↗ - Link to project (embedded project below)
z-exercise.glitch.me ↗ - Link to project (embedded project below)
z-file-metadata.glitch.me ↗ - Link to project (embedded project below)
If you made it all the way down here - thanks for reading! Tell me what you think... ↗ and here's some cake: 🍰