The client needs data from the server the and the server needs a way to present the data to the user on the client. They both need each other. And, if it weren’t for HTTP, they wouldn’t know how to communicate. Communication is a major key in any relationship, so it comes to no surprise that in 1991 Tim Berner’s Lee created the HyperText Transfer Protocol(HTTP) for communication between the client and server.
When I first started considering learning how to program, I asked a developer friend “what if I contribute some code and unwittingly break something?” The response was “there should be a process in place to prevent that type of thing from happening.” Makes sense. Most fields have some form of this practice: QA, copy editing, fact-checking, and the list goes on. For development, that process is called code review.
After working through the Tour of Heroes tutorial in the Angular 5 docs, I wanted to better understand a concept that was new to me: Observable. With that in mind, I started working on my own Tour of Cats 🐱, which I will reference below. For this post, I’m going to focus on how Observable handles async data requests. To get the most out of the post, it would be great if you knew the basic fundamentals of Angular 5.
For my final project, I built an application with a React/Redux frontend and a Rails backend. I created Greenthumb Gardens, which is an app that allows users to search community gardens in NYC and update and view the plants that can be found at each garden. I used the NYC open data API to get information on each garden. Container Components vs. Stateless Components The project required the app to have 2 container components and 5 stateless components.
For this project, I was required to add dynamic features that are possible only through jQuery and a JSON API to my previous Rails app, Socratic. After working through the requirements, I had some class-specific logic that was cluttering my JS files AKA spaghetti code. To clean things up, I moved this logic into the class files by using static methods. What is a static method? According to MDN, static method calls are made directly on the class and are not callable on instances of the class.
Keeping track of how things are supposed to work at work is hard. Nobody likes getting asked the same question over and over, especially ones that probably have answers buried in Slack or old emails. Socratic attempts to solve this problem. This app allows users to post questions and allows multiple users to answer one question. If a particular answer turns out to be most useful, the person who asked the question can mark this answer with a green check mark.
I’m a minimalist, so I’m usually looking for creative ways to get rid of items rather than keep track of them. With that said, for my Sinatra Portfolio Project, I created a CRUD app that keeps track of auction items. I started out by reviewing the MVC framework and building Google sheets to organize my ideas around routes and object relationships. Custom Validations Validations keep data you don’t want out of the database.
The Struct class is a quick way to create a class object without having to write out the initialize method or attribute accessors. Struct should be used when you have a simple object model with a known set of attributes. While arrays and hashes also provide simple ways to structure data, the Struct class offers an opportunity to create cleaner code by encapsulating attributes into a class. What about Arrays and Hashes?