Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch Backend? #31

Open
baseplate-admin opened this issue Feb 15, 2022 · 19 comments
Open

Switch Backend? #31

baseplate-admin opened this issue Feb 15, 2022 · 19 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested

Comments

@baseplate-admin
Copy link
Collaborator

baseplate-admin commented Feb 15, 2022

As the title suggests.

I am willing to learn a new language / framework for this project.

So suggest a framework.

@baseplate-admin baseplate-admin added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested labels Feb 15, 2022
@baseplate-admin baseplate-admin pinned this issue Feb 15, 2022
@baseplate-admin
Copy link
Collaborator Author

baseplate-admin commented Feb 16, 2022

I am eyeing Ruby on Rails. Still has the same problems as Django ://

@baseplate-admin
Copy link
Collaborator Author

baseplate-admin commented Feb 18, 2022

The format should be like this :

Django :

  • Pros :

  1. Built in admin panel. ( The single biggest reason to use it over something like Flask. I know flask has flask-admin. but its not official. )
  2. Strong ORM support.
  3. Migrations.
  4. Fast development time
  5. Django's Template Language.
  6. Python ( My preferred programming language )
  7. Opinionated. ( This way when I pass this project to another dev, they can understand how i structured my code. Instead of wasting hours trying to realize what is what and what to modify )
  • Cons :

  1. Cannot large responses. ( Well it can, but it's not what its designed for. So while it can do it. It eats a lot of ram in the process. )
  2. Cannot serve static files ( It can with whitenoise. But this is 3rd party )
  3. No built in REST Framework. ( Again 3rd party stuff )
  4. No NoSql support. ( Djongo exists. But the project is ...... kinda dependent on sponsorship. )
  5. No tree shaking. ( The python Venv in my PC is around 200 MB. This is the single biggest reason i am willing to switch )
  6. No task queues. ( Celery exsits. But it doesn't work on windows without some hacking. Also 3rd party. )
  7. Async support is not first class. ( sigh )
  8. django-rest-framework serialization is slow. ( I blame python for this )
  9. django-rest-framework is not maintained properly. See my comments in here
  10. django's StreamingHttpResponse is blocking.
  11. No supoort for nosql database

@TanimSk
Copy link

TanimSk commented Feb 23, 2022

Ruby on Rails is a good choice, but I would also suggest you to play around with Express

@baseplate-admin
Copy link
Collaborator Author

baseplate-admin commented Feb 23, 2022

Ruby on Rails is a good choice, but I would also suggest you to play around with Express

Hi there, Thanks for commenting.

But Express JS = Flask = Not battery included.

I was looking for a more full stack software.

@baseplate-admin
Copy link
Collaborator Author

baseplate-admin commented Feb 28, 2022

IMHO, nestjs and Blitzjs are the most full stack software.

But neither catches my eye.

Also Node.js and React :\

@baseplate-admin
Copy link
Collaborator Author

baseplate-admin commented Mar 11, 2022

Hey @TanimSk

You have a pick? I did most of the work in django-rest-framework now i think it will be a waste to let it all go to waste

@alaniskhan

This comment was marked as off-topic.

@baseplate-admin
Copy link
Collaborator Author

@TanimSk Do you think Laravel is a good pick?

@alaniskhan

This comment was marked as off-topic.

@baseplate-admin
Copy link
Collaborator Author

Umm what do you mean >__<

Is laravel a good pick?

@alaniskhan
Copy link

Umm what do you mean >__<

Is laravel a good pick?

yes it is a good pick

@alaniskhan

This comment was marked as off-topic.

@baseplate-admin
Copy link
Collaborator Author

baseplate-admin commented Mar 20, 2022

yes it is a good pick

Umm how so? I think its lacking the admin panel

@ankushagar99
Copy link

ankushagar99 commented Jun 27, 2023

What about fastapi ? it's Fast and good you can use pymongo with it to use Nosql databases and use sqlachemy for sql databases. I really loved your project and also a anime lover. I love to help you if you need but I am not good with sqlachemy I am still learning also I don't know much about sevelt but if you switch to reactjs I can help in that. Fastapi don't have admin pannel too sorry

@baseplate-admin
Copy link
Collaborator Author

baseplate-admin commented Jun 28, 2023

Hi @ankushagar99, thanks for taking an interest im coreproject.

So lemme answer some of your questions.

What about fastapi ?

I actaully do plan on moving onto fastapi. The entire project is written in django-ninja which adds fastapi like view engine to django, so Switching should be trivial.

it's Fast and good you can use pymongo with it to use Nosql databases

Actually i have thought of switching to no sql db. But it poses some problems for our use case. We have full text search in this project. So if we were to switch to a nosql db, we would also need elasticsearch and then we need something like monstache to replicate the data Between them.

Considering that the project needs to run on a 2GB vm ( in order to be self hosted by people ) this option is out of question.

I really loved your project and also a anime lover.

Thank you. It helps a lot :D

I love to help you if you need but I am not good with sqlachemy I am still learning

If you want, we can make a test repo to make a new backend. Fair warning, some of the database call in this project are super complex and it pushes django orm to It's limit.

I don't know much about sevelt but if you switch to reactjs I can help in that

I have mixed opinion about react. We specially switched from react because it was too slow for our v2 repo. check the discussion in #339 (comment)

But i would require @tokitou-san 's opinion. Recreating the Coreproject-v3-ui in react is a bit of pain right now since we plan on launching soon.

Fastapi don't have admin pannel too sorry

Lack of Admin panel is not a problem, we plan on having custom admin panel anyways :D


But i Was thinking of using graphql, ( because our project has a lot of endpoints )

Thanks :D

@moonlitgrace
Copy link
Collaborator

moonlitgrace commented Jun 28, 2023

Good day! We appreciate your interest, @ankushagar99.
We do require a customised admin panel, but moving to fastapi is a good thing overall, as @baseplate-admin mentioned.

Let's move on to the front-end portion and discuss why Svelte was chosen over React:

It's due to react's slowness (react is actually bloated; yes, it's svelte too, but less bloated).
Making users' computers noisy by repeatedly re-rendering too many components in react, in my opinion, is not a good idea.

And while Svelte ignores react's vdom diffing process, react is slower than Svelte as a result:
and consider using react with ui libraries like mui, chakra ui... it significantly affects performance

I don't know much about sevelt but if you switch to reactjs I can help in that

Similar to you, I initially believed that react was the best ngl when I started on coreproject.
Afterward, I acquired svelte for this project, and I have no regrets:)
@baseplate-admin, thank you

Hey, learning svelte won't take long—you already know how to react, right? you are aware of standard HTML, CSS, and Ts?
That's it; you just need to learn a few simple things (it only takes three days to get a fundamental understanding) and you're good to go.

check some links :)
https://www.reddit.com/r/reactjs/comments/12jwq6z/thoughts_on_svelte_vs_react/
https://www.reddit.com/r/sveltejs/comments/105skdr/react_devs_that_moved_to_svelte_do_you_find_that/

but if you switch to reactjs I can help in that

Additionally, if you are familiar with tailwind CSS, you can help with styling (although it would be difficult to do so without at least a basic understanding of svelte).

@XChikuX
Copy link

XChikuX commented Sep 11, 2023

Have you thought of fastapi with strawberry ?

@baseplate-admin
Copy link
Collaborator Author

Have you thought of fastapi with strawberry ?

Hi yes, we did think of that approach a while back. But while doing that approach we encountered automatically converting sqlalchemy models to pydantic models.

This resulted in a lot of boilerplate code, which is why we are back to strawberry with django :)

@XChikuX
Copy link

XChikuX commented Sep 13, 2023

Ah alright. Pydantic is still experimental in strawberry.
It works great though.
But, I understand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants