简体   繁体   中英

Should I implement the django rest framework above django?

Currently i have a Django blog website. (Fully functional)

This blogwebsite is something like a social media website...

I have read that django rest framework helps you to serialize your data.

Could I just check about the DRF:

  1. Is serializing data important? Meaning to say what huge benefits would I get by having an additional django rest framework, and also any possible disadvantages?

  2. Would it be very difficult to "add" the framework into my project. Eg does it require me to download a lot of things and change a lot of my codes?

  3. Where does DRF stand, is it in the backend of frontend or is it more of like in the middle. How does it integrate into my current IT architecture: with django as backend, htmlcssjs as frontend and postgresql as database

Thank you!

Also if anyone is kind enough to share resources about DRF/ open to a short zoom sharing session on DRF, please feel free to contact at kimjoowon777@gmail.com

The idea of Django Rest Framework (DRF) is to simplify and cut down a lot of code from your Backend (aka API).

Django (standalone Django, not DRF) is a framework that allows you to build Backend (and also Frontend).

DRF is a cool library that allows you to create a backend with Django but a lot easier.

DRF allows you to create endpoints that allow you to manipulate the Data (ie. models) very quickly and with very little code.

The "Serialization part" of DRF just automatically (also magically) transforms your models data into a response (usually json) for the client and vice versa.

It does take some learning and coding to transform your current backend into DRF. but in my opinion unless you backend is really special, DRF can allow you to create an awesome API with very little code

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM