Topic: How to connect events in the frontend with the backend using Flask and Bootstrap/MDBootstrap
meierlin free asked 2 years ago
I am new to web programming and wonder what is the most elegant way to integrate Flask on the server side with MDB and Bootstrap 4 on the design framework side.
I know that MDBootstrap was not created primarily for Flask. Nevertheless, there seem to be many users who successfully use Flask and MDBootstrap together.
I'm interested on a conceptual level how to connect changes in the frontend with the backend using Flask and Bootstrap/MDB.
For example,lets assume an editor table: If I delete the line via modal button, it is gone until I refresh the browser window. But how can this event be sent to the server - and finally to the database? Does it necessarily need Ajax or an API for this? Or how can this interface look like using between Flask and Bootstrap/MDBootstrap?
If anyone would like, I am happy to add some sample code from my project to better illustrate the issue. However, I generally refrain from doing so because I am interested in the answer on a conceptual level.
Thank you for any guidance.
I can't really help you with creating an interface between Flask and MDB as we do not use Python nor any of his frameworks in the MDB. Maybe our users who successfully integrated Flask with MDB could help you.
Generally speaking, unless you use cloud solutions you would have to create a backend server connecting with the database and a frontend connecting with the backend. For communication between frontend and backend, I would recommend you to check how to create applications with REST or GraphQL.
You can also check our MDB GO CLI that provides deployment and hosting solutions.
Keep coding, Marcin
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
- User: Free
- Premium support: No
- Technology: MDB jQuery
- MDB Version: MDB4 4.19.2
- Device: MSI GS66
- Browser: Chrome
- OS: Windows 10
- Provided sample code: No
- Provided link: No