Hacker News new | ask | show | jobs
by DeathArrow 1484 days ago
I wonder why all backends are now web based even if the frontend apps are not web based?

If someone does a mobile or desktop chat app (think Whatsapp or teams) he will use web technologies on the backend. But IRC is very old and still works like a charm without using web technologies.

Likewise, if email was invented today, it would be just calling some REST api instead of using SMTP.

When I worked as a game developer, the server side of our games was a slow and ineficient PHP crap becouse the founders were friends with a PHP programmer. I had to jump through many hoops to mask huge latencies from web server or even the web server not replying at all.

I think using web for anything can add a massive overhead.

I can see the advantage of the web, though. You don't need to implement a server, you just think in terms of HTTP requests and the framework will transform those for you in data and transform the data back into replies.

But if you need something real-time you have to use web sockets, and at that time the simplicity goes away and you can use OS sockets just as good.

I am arguing that using web frameworks for an app which won't have a web fronted adds almost the same kind of overhead as using Javascript for mobile and desktop apps. It's doable, yes. It's the best usage of resources, no.

Normally I should be the last one to complain since I architect and develop web apps for living.

But I do like efficiency, I think that sometimes many layers of virtulization, abstraction, indirection, protocol encapsulation are hurting both the performance and the speed of the development.

And I also know how to develop a server side app without using an HTTP server and a web framework.

I wonder if the root of the problem is that apart from the the people doing mobile apps, the rest are mainly learning a frontend or backend framework and they can't do or are not willing to do anything besides that. Or, even worse, new developers are just learning dynamic laguages such as Javascript or Python or PHP which catters mostly to the Web.

If you only have a hammer, everything looks like a nail.

When I had to design a tool to masquerade the real people data in our microservice based app, everyone from my team was amazed I wrote a console app instead of a Web based application. But since there it wasn't a need for that tool to be called through an API, why should I have made it a web app? Just to use curl instead of command line arguments?