If it was that simple than they would not both exist.
It will depend on what you are most comfortable in and how you want to host it. PHP cannot be hosted as serverless functions.
As well as the language you may want to consider whether you also want a framework. PHP has Laravel with good support for ORM and database migration based on application object models.
If you have to learn a new language I would suggest Python over PHP. I have nothing against PHP but Python will run serverless, is starting to get browser runtimes and is used for more things like machine learning, big data and automation.
If you want to be JavaScript front to back then before committing to node also have a look at deno. It solves some issues with node but is not as widely supported yet.
You also have Go, Rust, C#, Ruby as main players in this space.
At the end of the day, there is no right or wrong answer. Do so e research, work out which one makes you most productive and has the best support in your region/native language and use that.
It all depends on what type of server your using. If itβs a shared host, your mostly stuck with PHP. If itβs a virtual private server or your own, then whatever you like. Nodejs, Go, PHP, Python, Erlang, Java, Haskell, Prolog, etc. They all have their good points and bad points. It mostly depends on two things: what you already know and the application type.
I personally prefer Nodejs and Go for the backend, but that is what I know best. For a knowledge based system, I would go with Prolog. If it is a standard site or blog site, I would use Nodejs with Svelte Kit. There again, itβs depends on your needs and current expertise.
But, if it is just a blog or very simple side, then donβt use a backend but use a static site generator. That type of site can be ran from GitHub for free!
Top comments (5)
If it was that simple than they would not both exist.
It will depend on what you are most comfortable in and how you want to host it. PHP cannot be hosted as serverless functions.
As well as the language you may want to consider whether you also want a framework. PHP has Laravel with good support for ORM and database migration based on application object models.
If you have to learn a new language I would suggest Python over PHP. I have nothing against PHP but Python will run serverless, is starting to get browser runtimes and is used for more things like machine learning, big data and automation.
If you want to be JavaScript front to back then before committing to node also have a look at deno. It solves some issues with node but is not as widely supported yet.
You also have Go, Rust, C#, Ruby as main players in this space.
At the end of the day, there is no right or wrong answer. Do so e research, work out which one makes you most productive and has the best support in your region/native language and use that.
thanks
It all depends on what type of server your using. If itβs a shared host, your mostly stuck with PHP. If itβs a virtual private server or your own, then whatever you like. Nodejs, Go, PHP, Python, Erlang, Java, Haskell, Prolog, etc. They all have their good points and bad points. It mostly depends on two things: what you already know and the application type.
I personally prefer Nodejs and Go for the backend, but that is what I know best. For a knowledge based system, I would go with Prolog. If it is a standard site or blog site, I would use Nodejs with Svelte Kit. There again, itβs depends on your needs and current expertise.
But, if it is just a blog or very simple side, then donβt use a backend but use a static site generator. That type of site can be ran from GitHub for free!
Also, making an allowance for English is likely not your first language.. we are not all Brothers. You will have some Sisters too.
Go Girl Coders...
Node