Leman Kirme
Leman Kirme

Reputation: 550

linking web application's backend in python and frontend in flutter

I am making a CRM web application. I am planning to do its backend in python(because I only know that language better) and I have a friend who uses flutter for frontend. Is it possible to link these two things(flutter and python backend)? If yes how can it be done...and if no what are the alternatives I have?

Upvotes: 0

Views: 1291

Answers (3)

Leman Kirme
Leman Kirme

Reputation: 550

I used $.ajax() method in HTML pages and then used request.POST['variable_name_used_in_ajax()'] in the views.py

Upvotes: 1

OneCricketeer
OneCricketeer

Reputation: 192023

Yes. Most commonly used would be JSON-RPC over HTTP (more commonly, and incorrectly, referred to as a REST API). I'd suggest looking into OpenAPI / Swagger

Language choice doesn't matter. Import an HTTP client in Flutter, write a web server in Django, Flask, Quart, etc (your pick) and link the two using HTTP. That's all that's needed.

I'm sure gRPC could be used as well, which would allow you to potentially generate any Python server and Dart client code for flutter to import

Upvotes: 0

Anandha Krishnan Aji
Anandha Krishnan Aji

Reputation: 162

Yes you both can access same Django rest framework Backend. Try searching for rest API using Django rest framework and you are good to go.

Other alternatives are Firebase or creating rest API with PHP.

You would need to define API endpoints for different functions of your app like login,register etc.

Django rest framework works well with Flutter. I have tried it. You could also host it in Heroku

Use http package in flutter to communicate with the Django server.

Upvotes: 0

Related Questions