Since the frontend and the backend are deployed together, it makes sense to maintain them in the same code repository. While the “hybrid app” model feels a bit old-school, it’s good for enhancing the frontend of backend-heavy apps - whether new or pre-existing - without disruption. You’re comfortable with building full-stack apps with Django and you want to try a modern JavaScript framework while leveraging your experience.You have a team of full-stack developers - perhaps a team of one - and you’d rather avoid the overhead of managing separate backend and frontend projects.You prefer treating your app as a single unit because that’s more convenient for building new features, running integration tests, and deploying new versions. Your app needs good SEO (e-commerce, classifieds, portfolios, etc.).Keep in mind that I’m describing only one piece of the puzzle and that many variants are possible! Today I’m starting with the “hybrid app” model.ĭisclaimer: I’m starting with default project templates and making minimal changes in order to focus on the integration between frontend and backend.Īs a consequence, I’m ignoring many best practices for Django and React projects. I promised that I would describe how to implement each model. The “hybrid app” model: the same backend serves HTML pages embedding JavaScript components and API requests.The “single page app” model: a standalone JavaScript frontend makes API requests to a backend running on another domain.I described an alternative between two models: In my last post I discussed the trade-offs involved in choosing an architecture for integrating React with Django. Making React and Django play well together - the “hybrid app” model Making React and Django play well together - the “single page app” model.Making React and Django play well together - the “hybrid app” model.Making React and Django play well together.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |