Replies: 8 comments 10 replies
-
I don't know if this is a pro or a con, but the directory structure of GeoDjango is rigid due to it being opinionated. Because of that, new developers would, in theory, be familiar with project's directory structure (if they are already familiar with Django projects). FastAPI, on the other hand, really allows any sort of directory structure, so it would take more time to onboard new developers. That being said, we could (and should) document and enforce a particular type of directory structure for a FastAPI project. |
Beta Was this translation helpful? Give feedback.
-
I also think that the admin panel - FastAPI or Django - may be able to replace the single table viewers and editors envisioned in the current state of DataManager. Using the admin panels would save us a lot of time since those single-table viewers and editors would, essentially, already be made for us. A hudrle would be getting the style consistent between DataManger (which could be used for complex views and edits, such as a well viewer that shows location info, well info, and contact/owner info) and the admin page (which would be used for single tables). |
Beta Was this translation helpful? Give feedback.
-
After doing some development in Django here are some initial thoughts (more to come after I continue work in the repo). This may be slightly biased because I'm used to FastAPI and so that's the lens through which I'm viewing the pros and cons: Pros
Cons
|
Beta Was this translation helpful? Give feedback.
-
Some other pros of DjangoNinja are that it has built-in pagination and versioning, whereas those are done by third-party FastAPI libraries that are not well-maintained (less of an issue with pagination as that's easy to implement ourselves). |
Beta Was this translation helpful? Give feedback.
-
Some more thoughts... It seems to me that the biggest advantage of Django is the admin panel and all of its extensions, whereas the biggest advantage of FastAPI is its speed and "API-first" ethos. So, at least as I understand it at the moment, a big question is: do we want to prioritize Django and its admin panel (and extensions), or API development with FastAPI? Do others have this sense, too, or am I off with this intuition? I still need to work with Django ORM so don't yet have a good feel for it. That may change my thoughts as I use it. |
Beta Was this translation helpful? Give feedback.
-
A few notes I have after using Django during this sprint:
CONS:
Just like Jacob said: do we value the batteries included in the Django admin panel vs Fast admin? Or do we focus on the api first approach? How many of the data management issues can be solved by the out of the box implementation of DjangoORM with the admin panel? 50%? 90%? How many users would you give access to the admin panel? The admin panel can't do everything and isn't designed to, so at what point does it become a burden to maintain custom admin features if you're also still building the React-based Data Manager? |
Beta Was this translation helpful? Give feedback.
-
Fastapi vs Django benchmarks TL;DR. Fastapi is faster than Django |
Beta Was this translation helpful? Give feedback.
-
A ding against Alembic is that all models must be at least imported into another file for them to be recognized by SQL Alchemy's base and therefore recognized by Alembic. This is currently handled in
This means that we must manually keep track of all relevant models/modules. This can, however, be mitigated by putting all of the models into a single file (e.g. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
New Mexico Bureau of Geology and Mineral Resources Centralized Geospatial Data Management System
NMSqlalchemyPOC (aka NMSampleLocations).
pros.
cons
GeoDjango
pros
cons
Thought
The admin interface in Django is useful for development. Do we think it would be used directly by users, or will they only interface with Data Manager? The users commonly complain about one-to-one UI-to-table applications. Does Django replace Data Manager for Data Management? and Data Manager becomes Data Viewer?
Beta Was this translation helpful? Give feedback.
All reactions