Considering the upcoming advancements in AI, which programming language would be more beneficial to learn for the next 10 years: Java EE or Django if you want to integrate AI into web development?
There is nothing worse than bet your engineering career choices on some current hot bell & whistle or even maximizing salary.
First, you can't possibly know what will be next big thing in 10 years.
Second, your main skill that you sell is not a specific language expertise (except maybe few niche cases) - but your engineering skill (surprise surprise), not coding per se.
To become good at engineering requires a lot of time and effort, it is hard, it challenges your motivation.
To keep as much motivation as you can - you need to choose areas, domains and environments that you personally like, enjoy working with.
Java EE is everything that is wrong with modern software development packaged into one framework. :) It's not something you'd use voluntarily (unless the salary is really good).
Even people with 20 years of Java experience stay clear of JEE. I imagine the closest to Django on the JVM would be the Spring framework anyway. As of now, ML/AI is synonymous with Python so it could be your hint.
Java EE is pretty much dead in the traditional it was marketed and spoken of. Trendy things in the Java ecosystem nowadays are frameworks such as Spring Boot and MicroProfile (which took the good stuff from the old Java EE. Think JAX-RS for REST API's etc).
Django works with Python and in the AI space you'll want to iterate as quickly as possible, so I think that's probably going to be the preferred choice for beginners.
... AND experienced folks too. You just have to manage your expectations in terms of pure performance. Python will always be slower than Java, and mostly that is fine.
While Java EE can certainly be used for web development and has its strengths in certain enterprise contexts, Python with Django offers a more streamlined and accessible approach for integrating AI into web applications, thanks to Python's rich AI ecosystem and Django's ease of use and flexibility. So I'd vote for Python Django.
Considering the upcoming advancements in AI, the more beneficial will be to give a hard focus to software engineering fundamentals: object oriented programming design patterns, domain driven design, system design etc.
I personally expect that the number of required "coders" will decrease, whereas the software engineers will be always in demand.
Regarding an exact programming language, it really depends on what exactly you want to do. If we're talking about web development, Java as a language has one dishonest advantage: a very mature open source eco-system supported by the biggest world enterprises. They invest a lot there, because often Java is a heart of their internal systems. Sometimes I think, that in Java world there's at least 10 years old and very stable library for any feature I need: caching, object-relational mapping, validations, logging etc. When I say Java, I don't necessarily mean the Java EE. Spring or Micronaut also perfectly do the job.
If we're talking about AI world, the things become more complex. Python is widely spread for data analytics and experiments in the ML. Main reason for this is that there are lot of libraries to prepare data before you feed it into the model for learning. But if we're talking about libraries that actually do all the math under the hood or run neural network at scale, most of them are implemented with system-level languages, like C/C++. Mainly, because of speed. And in Python, you have only bindings, that allows you to call that native binaries from Python code. Same bindings exists for many other languages. As an effect, the python code for ML / Data analytics tasks resemble more procedural C code, for some weird reasons written inside python files, rather than nice object-oriented code you may face during web-development for python.
So, if you want to do machine learning and the web development, I would suggest you to think of them as about two very separate skills, that have nothing in common. If you want to do both, learn both independently.
I'd go Django, even if it's just to prototype the system. If you need to microservice out a django install, just grab all the views and turn each into it's own flask instance with the rest being a collective lib.
Coming from a sysadmin perspective, python apps require slightly less resources than a java apps do. Plus, like someone else said in the thread, it'll be easier to onboard developers at any knowledge level so it's great for beginners and advanced users.
It's even easier to go from plain Django to django-ninja when you want less HTML and more json api. Avoids needing to migrate from Django's ORM to sqlalchemy.
1) You don't have to keep 100 things maintained. Upgrading packages is not something that you are going to do that often, and really, you shouldn't even worry about upgrades unless there is a security problem.
2) Having modular code means that things are isolated when you DO need to upgrade.
That's bad advice, given how expensive it is to upgrade later.
You aren't gonna convince people familiar with Django that your API library is a Django replacement. That's like saying Express.js replaces Spring. Well, no...
> Also in my experience Django is extremely slow generally than Flask or FastAPI.
Nobody cares. Seriously. I can handle 100rps on a $5 server for most of the pages on my Django sites. Do you know how many $100m+ ARR businesses I've worked for that never hit 100rps on a regular basis? Most of them.
> for Flask / FastAPI
What about the dozen other dependencies you now need to use? and now you need to test those upgrades carefully, because python.
> Nobody cares... Seriously. I can handle 100rps on a $5 server for most of the pages on my Django sites. Do you know how many $100m+ ARR businesses I've worked for that never hit 100rps on a regular basis? Most of them.
I dunno, my clients paying my business care, speed is important in certain sectors such as mine.
I run and own a pest control SaaS on Flask that pulls in $1.7M+ ARR, when you're an upstart, speed is an advantage, I would imagine the $100m+ ARR business you worked for would be slow anyway.
> What about the dozen other dependencies you now need to use? and now you need to test those upgrades carefully, because python.
I just pin my dependencies, and since I'm making money it just runs itself really.
I should have rephrased it as "nobody picking Django cares". People pick Django because of how quickly you can build something valuable. Everyone knows it's slow IMO.
> when you're an upstart, speed is an advantage,
Yes, this is kind of the whole point of FastComments :) but still, the SLAs are like 30ms for most endpoints. I wouldn't use Django for this - but I wouldn't (didn't) choose Python either.
> I just pin my dependencies, and since I'm making money it just runs itself really.
Pinning is good. Never updating them is bad, gets a lot harder later.
Python is gonna be slower than Java and other compiled languages. Thats the price you pay for fast development. While most of your speed is going to be bottlenecked by network, there is still value in getting some optimizations to being able to handle more load.
Fast API is basically async implementation of your standard API coding on top of uvicorn (which is a web server), which is built on uvloop, which is a faster event loop.
There is nothing worse than bet your engineering career choices on some current hot bell & whistle or even maximizing salary.
First, you can't possibly know what will be next big thing in 10 years.
Second, your main skill that you sell is not a specific language expertise (except maybe few niche cases) - but your engineering skill (surprise surprise), not coding per se.
To become good at engineering requires a lot of time and effort, it is hard, it challenges your motivation.
To keep as much motivation as you can - you need to choose areas, domains and environments that you personally like, enjoy working with.
Django works with Python and in the AI space you'll want to iterate as quickly as possible, so I think that's probably going to be the preferred choice for beginners.
https://javalin.io/
JEE is more enterprise oriented, used in lots of big companies.
I personally would recommend you Django, it's more flexible in my opinion.
Also I prefer Python 100 times over Java, but that is very biased on my side :)
P.S. I am mostly using React + NodeJs (ExpressJS), again personal preference here :)
Regarding an exact programming language, it really depends on what exactly you want to do. If we're talking about web development, Java as a language has one dishonest advantage: a very mature open source eco-system supported by the biggest world enterprises. They invest a lot there, because often Java is a heart of their internal systems. Sometimes I think, that in Java world there's at least 10 years old and very stable library for any feature I need: caching, object-relational mapping, validations, logging etc. When I say Java, I don't necessarily mean the Java EE. Spring or Micronaut also perfectly do the job.
If we're talking about AI world, the things become more complex. Python is widely spread for data analytics and experiments in the ML. Main reason for this is that there are lot of libraries to prepare data before you feed it into the model for learning. But if we're talking about libraries that actually do all the math under the hood or run neural network at scale, most of them are implemented with system-level languages, like C/C++. Mainly, because of speed. And in Python, you have only bindings, that allows you to call that native binaries from Python code. Same bindings exists for many other languages. As an effect, the python code for ML / Data analytics tasks resemble more procedural C code, for some weird reasons written inside python files, rather than nice object-oriented code you may face during web-development for python.
So, if you want to do machine learning and the web development, I would suggest you to think of them as about two very separate skills, that have nothing in common. If you want to do both, learn both independently.
I wouldn't do this unless I absolutely had to.
2) Having modular code means that things are isolated when you DO need to upgrade.
You aren't gonna convince people familiar with Django that your API library is a Django replacement. That's like saying Express.js replaces Spring. Well, no...
Even placing a CDN in front of Django doesn’t help in that regard.
With that being said, not many people upgrade their dependencies that much anyway for Flask / FastAPI.
Nobody cares. Seriously. I can handle 100rps on a $5 server for most of the pages on my Django sites. Do you know how many $100m+ ARR businesses I've worked for that never hit 100rps on a regular basis? Most of them.
> for Flask / FastAPI
What about the dozen other dependencies you now need to use? and now you need to test those upgrades carefully, because python.
I dunno, my clients paying my business care, speed is important in certain sectors such as mine.
I run and own a pest control SaaS on Flask that pulls in $1.7M+ ARR, when you're an upstart, speed is an advantage, I would imagine the $100m+ ARR business you worked for would be slow anyway.
> What about the dozen other dependencies you now need to use? and now you need to test those upgrades carefully, because python.
I just pin my dependencies, and since I'm making money it just runs itself really.
> when you're an upstart, speed is an advantage,
Yes, this is kind of the whole point of FastComments :) but still, the SLAs are like 30ms for most endpoints. I wouldn't use Django for this - but I wouldn't (didn't) choose Python either.
> I just pin my dependencies, and since I'm making money it just runs itself really.
Pinning is good. Never updating them is bad, gets a lot harder later.
Fast API is basically async implementation of your standard API coding on top of uvicorn (which is a web server), which is built on uvloop, which is a faster event loop.