OK Guys & Girls,
I am struggling at little bit getting my head around nodeJS, so the question I have is it really worth it when building a site that involves a lot of database queries?
Or am I better sticking to .php
You input would be really appreciated with pro’s and cons’s
I think you’re going to get a mixed response. Personally, PHP offers everything I’ve needed in the projects I’ve worked with and I’ve been using it for over 20 years so am completely comfortable with it.
However, there are features which are not available, web sockets being one, where NodeJS will be a better fit.
But then there’s hosting. Standard shared hosting generally doesn’t include NodeJS whereas PHP is available pretty much everywhere.
PHP is still active and I honestly can’t see it disappearing any time soon. NodeJS has me slightly more nervous because it’s had a much shorter lifespan but that doesn’t mean it won’t outlive PHP, we just can’t be sure.
So I would say give NodeJS a go and see how you get on with it but don’t be afraid to stick with PHP if you feel happier with that. For now, I’m still with PHP. I do intend using NodeJS for a future project, I just haven’t yet.
I’d say this. If a Client requests it go for it. If you have space to experiment and learn, go for it. We as an operation have embraced Node and Docker, a little late to the party and a steep learning curve, but the benefits are there to be reaped…
Nothing wrong with PHP or HTML. Still relevant, still does the job, and in reality neither are going anywhere soon. Aside from that I echo what @sitestreet has said above.
For a fairly typical site - eg something pretty standard for a small business - do you think there are many benefits (apart from web sockets)? The main disadvantage seems to be hosting - which is a pretty big disadvantage.
Also, it seems the vast majority of problems on this forum are NodeJS-related. This could be because most people are using NodeJS, or because Wappler + NodeJS is relatively new. I'm sure it's also because of the hosting challenges. If I can find the time, I would to get more familiar with NodeJS, but I'm also hoping/expecting it might be a little easier if I wait.
Thanks @Dave - that’s a good article. I have little doubt NodeJS will be the way to go, apart from anything else, because people who know a lot more about such things than me think so.
However, I rather like the quiet life with PHP. I’ll need to do an upgrade of myself before getting into NodeJS (something which is probably overdue).
With all of the support questions here related to Nodejs and Docker issues combined with the high price and complications of hosting, to me it’s not worth it.
PHP still does everything that Nodejs can do except sockets. I don’t see myself switching anytime soon.
No, but it's in the same boat. Too many support issues. I know they are not tied together but it seems most people having trouble with node are having trouble with docker as well. They just don't seem worth the troubles and expenses. So I lumped them together. Hopefully in time hosting won't be so much of a hassle.
You can say this for any other hosting type and server model, many issues setting up ftp, remote directory and similar this doesn't mean Wappler has ftp problems and you should not use it
As explained above - that's not the case. Nodejs integration is stable and that's been for quite some time already...
I really don’t want to get into a big debate about it. Yes, Nodejs is good.
Just making the point that Nodejs has too many hosting barriers that can’t be overcome unless you have unlimited patience and money. And that’s just for production hosting. Hosting a local development server is another whole issue. (No, Docker is not an option) It’s just not worth it for what you get in return in my opinion.
If you have the extra time and money by all means go with Nodejs.
Wappler has a built in node server... unlike PHP (where you need to install and run a local server), you don't need anything additional to run nodejs pages/sites locally. You hit F12 and your page runs in your browser.
Costs no more to host Node and Docker than it does to host PHP Brad. We had a multitude of dedicated servers running several versions of PHP for legacy applications etc. On top of that there were multiple variations of MySQL and MariaDB. All with different configurations. Not only have we saved a small fortune in hosting switching over to Node and Docker but we have saved a massive amount of time in migrations as we just upload the Container and the job is essentially done for us. Admittedly it has not been easy, but then saying that nothing is ever that simple, PHP or otherwise. To go back to the original point of this reply there is no additional cost compared to PHP or otherwise. And if you do run your own server, using WHM for example, and even Plesk, it is easy to install Docker and Node on it. Might take a little time reading a few guides and basic configuration, but after that its very easy to maintain. Just my experience so far.
Further to the above. Obviously Node has no relevance to the simplicity of containers once deployed, which can run pretty much anything legacy or otherwise, that is your choice to deploy whatever images and services you want included. Just clearing that up. But when you work with outsourced developers its become quite defacto we have found… Also NPM (the Node Package Manager) is a true blessing!
Yes it does! My host requires a VPS to host Node ...... I am looking at about $89/month compared to $19/month. Huge difference. Plus I have to manage the server myself. And no Docker support. (Not that I would use it anyways).
But the price Node hosting is beyond reachable.
AWS isn't an option because you never know what the bill is going to be and can't put more than one site on a plan.
Also, because I host personal information in Canada the regulations require that I am on a Canadian Server.
I'd beg to differ there entirely. Really depends on your host and location. I'd suggest shopping about. But then if its a commercial application its income should cover its running costs anyway..? So they become negligible essentially... Ask a host to enable a legacy version of PHP for you and see how much they try and charge you! Just an example of how configuration will inevitably affect pricing. Node does not cost more to host in the majority of circumstances. Yours may indeed be very different and unfortunate mate.
@brad for me its not about the cost as we have our own servers. So my hosting cost stays the same regardless.
It more so about the learning curl and if it is worth it, or would I better stoping with PHP.
Basically what advantages would I have using node (apart from websockets) compared to php.
Really did not want to cause such a divide on this thread.
Don't think there is a divide here. Just experience cases. A few weeks ago I was laughing at @JonL about Node versus PHP... How quick things change. I'm not an advocate, I'm just a happy user with happy Clients.