Skip to content

The Architecture

Just as we did for the previous applications, let’s have a brief discussion about the architecture of this application in relation to the concepts we have been focusing on. As you will see, the architectural concepts for this application don’t really differ to the concepts we have been using so far. That’s what I like so much about the approach we are using - it’s a reasonably simple structure that suits most applications very well.

This application will have just one smart/routed component:

  • home

We will have a few dumb/presentational components:

  • gif-list to handle displaying the list of gifs
  • gif-player to handle loading/playing/pausing gifs
  • search-bar to allow the user to supply a particular subreddit

We will also have a single service:

  • RedditService to handle fetching and parsing data from Reddit

Perhaps the most notable difference for this application, apart from that complex stream I mentioned, is that we will be dealing with fetching external data with HTTP requests in this application. Not only will we be fetching some data, but we will be using it in a rather abstract way, and we are going to have to deal with creating custom interfaces for that, parsing it to only include the specific data we need, and using pagination to fetch more data.

Ok, let’s get into it!