8 ms·
I worked at an org which has a ‘modern’ NodeJS+React codebase and an ancient legacy Django app on Python 2.7 which is nearing 15 years old. I was worried that
by varun_ch 11mo ago
I worked at an org which has a ‘modern’ NodeJS+React codebase and an ancient legacy Django app on Python 2.7 which is nearing 15 years old.
I was worried that the old codebase would be a pain to work on. It was the complete other way around. The Django app was a complete joy to work with and I literally had so much fun tidying it up and working with it that I’ll be sad when they finally retire it in favor of the new new Go/React rewrite.
- chistev 11mo agoWhy would they retire it? If it ain't broke...
- SteveNuts 11mo agoIt’s very likely that project is a security nightmare. Just an OS old enough to support 2.7 would be problematic.
- gusgus01 11mo agoI just verified. You can install Python 2.7 on an up to date Windows install as well as an up to date Linux install. Python 2.7 hasn't received security updates (or really any updates) in years, but that does not mean it can't still work on an up to date OS.
- uniqueuid 11mo agoThe latest 2.7 seems to have a lot of CVEs (did not verify that manually though) https://www.cvedetails.com/version-list/10210/18230/10/Python-Python.html?sha=3b5532b84e25b1f44172dc39fec9f0731496bdf5&order=1&trc=589 https://www.cvedetails.com/version-list/10210/18230/10/Pytho... IIRC some commercial distros maintain patches for 2.7 but then you're paying for being 15 years behind the future.
- gusgus01 11mo agoYeah, it's been 5 years (almost 6) since python 2.7 stopped receiving security updates, but it does still run on modern OS's. Looking at the list, I'm actually kind of surprised there aren't more CVEs for python 2.7, but if you're only running it locally or on an intranet I could see letting it ride.
- inemesitaffia 11mo agoThere are variants of Python 2.7 that are supported
- nurettin 11mo ago2.7 gave me problems last time I tried to install it from source on redhat. Something about ssl incompatibility.
- jim180 11mo agowouldn't it be faster/safer to upgrade to latest django/python rather than rewrite it in React/Go?
- OoooooooO 11mo agoPython 2 to Python 3 in a Django codebase ... may be a full rewrite anyway.
- dirk27 11mo agoMany people migrated Django projects from 2 -> 3. Certainly something that takes effort, but hardly a rewrite.
- graemep 11mo agoNothing like a full rewrite. I migrated multiple projects, but while there is a significant amount of work involved its a tiny fraction of what a full rewrite would require.
- stuaxo 11mo agoIts fine, I ported quite a few Django libraries to python 3 at the time just because I wanted to use them. 2to3 gets you pretty far and theres not much in the rest.
- elzbardico 11mo agoDid it a couple of times. Not something you can do with your eyes closed, but not even close to the nightmare of upgrading a JS application or upgrading a rails app.
- blagie 11mo ago"Fun" isn't the same thing as "functional." I remember having great fun in QuickBASIC. And my son enjoys Scratch. Django code is much more fun to work with than Node, but I can't imagine developing something competitive in it in 2025 to what I'm developing in Node. Node is a pain in the butt, but at the end of the day, competitiveness is about what you deliver to the user, not how much fun you have along the way. * I think the most fundamental problems are developer-base/libraries and being able to use the same code client-side and server-side. * Django was also written around the concept of views and templates and similar, rather than client-side web apps, and the structure reflects that. * While it supports async and web sockets, those aren't as deep in the DNA as for most Node (or even aiohttp) apps. * Everything I do now is reactive. That's just a better way to work than compiling a page with templates. I won't even mention mobile. But how you add that is a big difference too. It's very battery-included, but many of the batteries (e.g. server-side templating language) are 2005-era nickel cadmium rather than 2025-era lithium ion. I would love to see a modern Node framework as pleasant to work with, thought-out, engineered, documented, supported, designed, etc. as well as Django, but we're nowhere close to there yet.
- m90 11mo agoYou spell out a lot of examples, but all of them are purely technical. What is it that you can deliver to the user using Node that you cannot deliver using Django? This is a genuine question.
- blagie 11mo agoThere is nothing you can't do, given a Turing-complete language. That doesn't make it reasonable or convenient to do so, though.
- rolymath 11mo agoYou must not be very imaginative. Plenty of Django businesses making tens of millions. Some in the billions. I know a solopreneur making around $2m a year and all he uses is Django
- vb-8448 11mo ago
- stuaxo 11mo agoDo a guerilla port of it to modern Django.