Bootcamper's Blog - Week 4

My fourth week at the School of Code bootcamp.

Bootcamper's Blog - Week 4

Week four was amazing! I would have to say that so far this has been my best week. I felt that I really got to grips with the topics we covered very quickly and it was very enjoyable working on the backend!

Let's start with a breakdown of the week...

Node.js

This week was a full u-turn from UX/UI design to looking into backend development. We spent time with node.js, which served as our backend tool for the week. Even the basics were fun and I enjoyed experimenting with it. I am looking forward to what I will learn to do in the future.

REST api

In short REST is a set of architectural constraints. API developers can implement REST in a variety of ways.
When a client request is made via a RESTful API, it transfers a representation of the state of the resource to the requester or endpoint. This information, or representation, is delivered in one of several formats via HTTP. JSON is the most generally popular file format to use because, despite its name, it’s language-agnostic, as well as readable by both humans and machines.

In order for an API to be considered RESTful, it has to conform to these criteria:
1. A client-server architecture made up of clients, servers, and resources, with requests managed through HTTP.
2. Stateless client-server communication, meaning no client information is stored between get requests and each request is separate and unconnected.
3. Cacheable data that streamlines client-server interactions.
4. A uniform interface between components so that information is transferred in a standard form.

Express

Express is an npm that serves as a web framework for node.js. It allowed us to do so much without having to make all of the code ourselves. The use of this package also opened our eyes to the possibilities that other packages offer.

And of course we ended with a hackathon

For our hackathon this week we took all our new knowledge and built a simple server that could be linked to a front end and call on a simple API. It was great fun and I found it really satisfying breaking apart my code into more manageable files to separate my concerns. We used GET (read), POST(create), PUT(update/replace), PATCH (update/modify), and DELETE. We also used Postman to see our results and to get used to the interface.

My main take away from each day in Week Four.

Monday -

Monday’s main take away was getting used to working with javascript in a terminal setting and adjusting to a new type of feedback from your code. Not seeing changes on the browser was an interesting change.

Tuesday -

Tuesday was great. It felt like a real first dive into backend development. We created a small api and the process was really intuitive and satisfying. It made me excited for the rest of the week!

Wednesday -

We looked into more specific ways of accessing data in an api. Using various routes within our router. We also learnt how to separate our routes away from our main file for better organisation. I also think this will help in the future when I try to implement unit testing.

Thursday -

On Thursday we were introduced to middleware. This has opened so many doors to all things we can do with requests that come into our server and I absolutely loved it. For example, we looked into rate-limiting as a team; this allows for a server to set up a simple request limit across a chosen period of time. This small addition in its simplest form can set up a very simple way to limit the success of bot attacks. More complexly it can also help set up password attempt limits!

Friday -

I spent a lot of time on Friday helping other groups. Me and my pair completed our hackathon early on in the day and it was really nice to work through others problems with them and see them breakthrough the issue. It was great to build my teaching skills.


If you've got this far, thank you! Week Four was probably my favourite so far. If you want to follow along with my journey please do. If you want to contact me for any reason also the best place to connect with me is Twitter - @_pattisoj. You can also find my GitHub here. I hope you have a good week and, as always, happy coding!