coreproject-moe / CoreProject

Imagine a new platform
GNU Affero General Public License v3.0
114 stars 22 forks source link

Switch Backend? #31

Open baseplate-admin opened 2 years ago

baseplate-admin commented 2 years ago

As the title suggests.

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

So suggest a framework.

baseplate-admin commented 2 years ago

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

baseplate-admin commented 2 years ago

The format should be like this :

Django :

  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 :

  8. 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. )
  9. Cannot serve static files ( It can with whitenoise. But this is 3rd party )
  10. No built in REST Framework. ( Again 3rd party stuff )
  11. No NoSql support. ( Djongo exists. But the project is ...... kinda dependent on sponsorship. )
  12. No tree shaking. ( The python Venv in my PC is around 200 MB. This is the single biggest reason i am willing to switch )
  13. No task queues. ( Celery exsits. But it doesn't work on windows without some hacking. Also 3rd party. )
  14. ~Async support is not first class. ( sigh )~
  15. django-rest-framework serialization is slow. ( I blame python for this )
  16. django-rest-framework is not maintained properly. See my comments in here
  17. django's StreamingHttpResponse is blocking.
  18. No supoort for nosql database
TanimSk commented 2 years ago

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

baseplate-admin commented 2 years ago

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 commented 2 years ago

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

But neither catches my eye.

Also Node.js and React :\

baseplate-admin commented 2 years ago

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 commented 2 years ago

As the title suggests.

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

So suggest a framework.

How to connect the backend with the frontend

baseplate-admin commented 2 years ago

@TanimSk Do you think Laravel is a good pick?

alaniskhan commented 2 years ago

i have a

ofcourse

baseplate-admin commented 2 years ago

Umm what do you mean >__<

Is laravel a good pick?

alaniskhan commented 2 years ago

Umm what do you mean >__<

Is laravel a good pick?

yes it is a good pick

alaniskhan commented 2 years ago

hey can you give me you whatsapp number

baseplate-admin commented 2 years ago

yes it is a good pick

Umm how so? I think its lacking the admin panel

ankushagar99 commented 1 year ago

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 commented 1 year ago

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 https://github.com/baseplate-admin/CoreProject/issues/339#issuecomment-1173071173

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 commented 1 year ago

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 commented 1 year ago

Have you thought of fastapi with strawberry ?

baseplate-admin commented 1 year ago

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 commented 1 year ago

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