I noticed that most of the job offers posted out there by early stage startups are not for Java developers. The thing that seems so strange to me is that, for startups, the most popular position is for PHP developers.
I also noticed that Ruby on Rails is becoming very popular in startups. Does this language offer something that Java doesn't? I am asking if these kind of preferences depends more on psychological reasoning, or are related to a language learning curve...
What do you think?
We should not be comparing languages but overall ecosystem here.
PHP is very good at getting you a website with CMS off the ground. It has number of frameworks to do that. PHP developers are also much cheaper.
Java (or other JVM based languages) has a very mature ecosystem.But if all you want to build are a few pages served from a CMS , it is not the most productive environment
I do not believe a specific programming language plays that big a role in success of a startup. Unless you reach to the scale of linked in or twitter. What does matter though is quality of software engineering , strong commitment to engineering practices.
I haven't heard of many start-ups choosing to go with PHP lately unless they are searching for Wordpress developers (as it is built on PHP) or have an already developed app that was built in PHP. Java is a general purpose programming language whereas PHP is a server-side scripting language. I won't go into the differences since you can most definitely google an in-depth comparison. I never recommend PHP to my start-up clients. Among many things, it opens up your application for spaghetti code due to the fact that it does not offer a strict Object-Oriented structure, has many security concerns, and does not scale.
I'm a freelance senior software engineer and start-ups reach out to me with request each week. The majority of clients that let me know they would like to use a particular technology (instead of letting me consult them on the best technology for their project) choose that technology based on buzz words coming out in the start-up culture. A lot of the time start-ups like to choose newer languages because they believe a newer language equals better and swifter technology. None of these reasons are a good one when looking to choose the best technology for your start-up. The questions to ask and consider are 1. How sturdy is the language for what I'm trying to do? 2. How easy will it be to find good developers that know how to use the technology (ex: ColdFusion is definitely not the answer here). 3. How fast would it be to build what I'm trying to build using this language/framework (i.e. you don't need a Mammoth when an Elephant will do).
With that said, I love Java. It is open source - so free to use for start ups. It is sturdy and vetted vs the new languages that are coming out. Many enterprise-level applications are written in Java because corporations understand it's benefit. The problem is, however that not many freelance start-up developers work with it because it is not a new cool buzz word that start-up owners throw around - you can see the catch 22 here.
It all comes down to budget and project.
PHP is by far one of the easiest languages to deploy, which makes it a very good candidate for startups with small budgets.
The reason for this, is that about every web hosting service will offer a LAMP (Linux, Apache, MySQL, PHP) infrastructure to support these applications.
It is worth noting that it is also the base language behind Facebook, which gave birth to HHVM.
Ultimately the choice of language depends on what the long term plans for the project are and what the business requirements dictate.
In regards to Rails, and by association the Ruby on Rails framework, it is a very flexible language, but deployment options are much more limited and require a bit more know-how and planning.
Deploying a Rails application also usually involves higher hosting costs.
One of the most common Rails hosts is Heroku, but you can also use DigitalOcean through nginx+Rails compiled docker images or AWS using ECS.
As far as Java is concerned, and Java derived languages (Kotlin, Scala, etc), these are more oriented towards larger infrastructure decisions, such as microservice-based applications.
In conclusion, it's not really about what Java can offer that PHP doesn't, it's more about finding the right tool for the project you are trying to implement.
Each of them has their pros and cons and you'll find great developers for any of those languages that can achieve the needed results.
There are things that each language is good for. PHP is easy to get going with, easy to find developers for, and it has lots of software already written and free to use, like WordPress, Drupal, etc.
PHP is a relatively easy scripting language to learn, same for Ruby. You can set up the back end for a website pretty quick. But they both have serious downsides for long-term production use and a lot of people don't like them.
" The most disliked languages, by a fairly large margin, are Perl, Delphi, and VBA. They’re followed by PHP, Objective-C, Coffeescript, and Ruby. "
Well I think it depends by what the product is and also by how the startup project has begun.
For example if you are not a developer and you are looking for a tech co-founder, probably the backend code will be based on the co-founder knowledge and if he/she is recently graduated, probably he will come with a background in PHP or Python. I know of universities that teach PHP or Python as main backend code.
SAE a professional school that last 1-2 years, as main backend code teach PHP, at least here in Berlin, I don't know in the other branches.
So at that stage as non tech founder, I would say that you take what you find, if you do not have other choices, and believe me, find a tech co-founder is hard and pretty hard when the only salary is equity.
A friend of mine works as CTO since 11 years for a company that offer a wide range of services to high profile national companies, these services include also software and web development.
He told me that for many years they coded in PHP within the web development field, until they changed for RoR. He loves RoR and he would never get back.
This brings me to tell you when 2-3 years ago I've decided to work on my personal startup project, a SaaS.
My code knowledge was zero, so I've talked with a Python teacher in US, with a RoR dev here in Berlin and with PHP and Java devs.
I've explained them what I wanted to do, that it was about track data, analysis, manage dashboard etc.
Python dev, said that Python was the best choice.
PHP dev, said that PHP was the best choice.
RoR dev, said that RoR was the best choice.
Java dev, said that Java was the best choice.
At the bottom the summary according to a couple of them, was that actually you can build something with whatever code you want, and that most of the time is a feeling choice of the main developer based on what he likes more or feel more comfortable to use.
Still last example to say that like you, I never found a definitive rational answer. When I've attended a code course, where they were teaching RoR ('cause the industry consider PHP easy to learn by yourself, this is what they said, but RoR isn't it too?), the teacher of this course told me that he would have used RoR only to lunch some prototype, 'cause it's pretty quick, which is true, but that he would not have used it to build a whatever kind of final product.
However, AirBnB use RoR and React.