DEV Community

Backend Development in Flask

Your app has two side, we have the frontend and backend. Frontend is what you see, the layout, the buttons etc. The backend is the engine, it's the brain of your website, it's the one that is storing the data, users, payments, authentications etc. Api is the messenger that is used to communicate between the two, basically when the frontend wants to request something from the backend it sends the api and then when backend wants to send back the response to the frontend it send s the API.
when talking about backend development you will hear people talk about Restful API's. So what does Rest means its the REPRESENTATION OF STATE TRANSFER. REST is not a framework or a library it's just a design style used to build predictable APIs, it practically gives the API structure. When using RESTFUL APIs you'll use this like get, put, post etc
Lastly we have JSON, what is JSON? This is basically the language format that is used to communicate between frontend and backend, so they practically communicate using JSON format eg { "name": "Emma", "age": 24 }. so what the backend does before it sends any data to the frontend it takes the python object in the code from your code or your database and then it takes that data and change it to JSON. Now the process of changing it to JSON format that that is called SERIALIZATION. When the backend now receives the data for example from the frontend and it wants to now handle it in terms of Python objects so it sends back data using the formart we are talking about the JSON format, python has to convert JSON object into python object. Now this conversion from JSON to python objects is called DESERIALIZATION

Top comments (0)