In part 3, we saw how we could Leverage django rest framework to build an API for our chat app, In this part we’re going to build the Chat UI and connect it to the API we built earlier. At the end of the part we should have a complete chat application with a URL that we can share to friends we want to chat with.
Believe it or not, writing tests can help you structure your application properly which eventually leads to better code. Some developers even advise others developers to write tests before the main program, as it helps you envision how your functions/methods are going to look and work before you start writing the main program.
Let's think of our web application as a hotel, you have customers that stay in the hotel and order food from the hotel's restaurant. Let's also assume that we have only 3 cooks and numerous "room service staff"
Basically, a flask blueprint is a way for you to organize your flask application into smaller and re-usable applications Just like a normal flask application, a blueprint defines a collection of views, templates and static assets.
In this part, we’re going to be connecting our React front-end with the REST api we created previously, basically we’ll make a request to the server and then our api responds with a json result, and then we use the received data to update the DOM if the request was successful or tell the user that something went wrong.