Any Python folks around here?

Be sure to read and follow the guidelines for our forums.

Nov 20, 2018 3:38 am
With the site v2 underway, I'm considering some tech changes. Among them is using PostgreSQL instead of both MySQL and MongoDB, and I'm considering using Python over PHP. I'm new to the Python world, and Django REST looks great, but I've heard that Django's structured nature can be problematic when dealing with stuff like customizing users. Is there any truth to that? Anyone have feedback on it? If I stick with PHP, I can copy code from the current API/codebase, but I feel like there may be advantages to switching languages.
Nov 20, 2018 3:31 pm
I've done a bit of Django, and I'm not really a fan. Seems a bit crufty to me, but still far better than PHP in my opinion. I'm a Rails developer though, so I've got a bit of a bias and it's been a few years since I tried it. A colleague of mine really likes Flask though for Python web development, so maybe give that a gander. I think PostgreSQL is a good choice for a database though.

If I had to suggest a stack for Gamer's Plane, I'd go with NodeJS, PostgreSQL, Express all backing the Angular front end. NodeJS is a pain in the ass to write because everything has to be asynchronous, but at the same time that's what makes it fast and gives it the ability to handle a ton of simultaneous requests. Also you'd be able to jump right in since you're already writing Javascript after all.
Nov 20, 2018 3:53 pm
I've considered Node, and while it is fast, I still feel it's too young to really usable. One of the reasons I was looking at Django is it easily has one of the best ORMs I've ever used.
Nov 20, 2018 4:17 pm
Ha, I was thinking the same thing about Angular. Front end frameworks are a bit of a chaotic mess right now, so I just stick with JQuery unless I have an urgent need for two way binding, which I really never do. But if you already have a working Angular front end there's no need to change that up, and there are plenty of people who like the framework.

You might run into some scaling issues with Django, but nothing that can't be fixed by throwing up more instances and scaling horizontally. The database is always a likely bottleneck though, so make sure to keep an eye out for N+1 queries which are easy to slip in with an ORM.
Nov 20, 2018 6:18 pm
Hm, didn't think about that. I'll look into the scaling issues, but if Gamers' Plane hits the point where scaling is a concern, that's a REALLY good problem to have. Hell, we're on a tiny box right now.
Nov 29, 2018 4:56 pm
I'm a big fan of Typescript and thus Angular and I've just started playing with Nest which is a back end framework laid over Node/Express that uses a very similar structure to angular and they work really nice together. Node and Angular are pretty well established at this point and I don't think you'll have scaling issues. I would just pick a version of Angular (probably 6) and stick with it since they seem to put out a new version every six months.
Nov 30, 2018 6:57 pm
Yup, the even numbers are the LTEs, the odd are more experimental. I'm currently building in 6, just because a few packages I'm using aren't 7 compatible yet. The site is gonna be Angular, just a question of what drives the data :p
Nov 30, 2018 8:02 pm
Strongly recommend you take a look at Nest js
Nov 30, 2018 11:03 pm
Keleth says:
I've considered Node, and while it is fast, I still feel it's too young to really usable.
That might have been a thing to worry about 8 years ago, but node has been around and is as solid as a tool need be.
Feb 8, 2019 12:23 pm
Sorry I missed the thread (don't check the public forums a lot), but Python is a great choice. As a professional software developer, it is my favorite language to work with (but Java is the industry standard in my field, so :/ ) But if you're confortable with PHP, there are solid frameworks to work with that too so the change of tech is mostly a matter of taste (which is important).
Postgresql is a great choice, I second it. Don't fall for the nosql databases, as your data clearly is relational : you'd end up with a freaking mess.
Django is a solid pick too, but comes with a cost like every big framework. I've barely used it, so I can't tell you much about the amount of customisation you'd have but I'm fairly confident that you should be able to do whatever you want. There's a thing called Django-quicky that eases the Django setup. You might want to check that out.

I almost exclusively do backend development, so I rarely approach the front but Angular seems to be a solid choice that I tend to see a lot at work. My colleagues confirm that it is a powerful and reliable front end framework. So I guess there's that. Or stick with Jquery, you know. KISS.
Last edited February 8, 2019 12:31 pm
Feb 8, 2019 12:45 pm
as a Web Developer myself, don't try node.js for CRUD stuff, you will pay for it with your blood, it's good for API development, otherwise i would not use that. Python/Django is nice but i don't see how it's better than PHP+Laravel or PHP+Symfony.
Feb 8, 2019 6:10 pm
Ornux says:
I almost exclusively do backend development, so I rarely approach the front but Angular seems to be a solid choice that I tend to see a lot at work. My colleagues confirm that it is a powerful and reliable front end framework. So I guess there's that. Or stick with Jquery, you know. KISS.
Oh man, after using Angular for so long, I don't think I could ever go back to jQuery. It'd either be Angular or React for me now :) (I know Angular better)

You do not have permission to post in this thread.