0

I am currently coding a web application using Django (4.0) with Django REST Framework for Server-Side Python scripts and NextJS for Client-Side Javascript.

I have a function implemented in Python that helps to upload an image to IPFS and returns an image URI in order to display the image on the web page. Besides that, I have also a Javascript code that does exactly the same but on the Client-Side. What's the efficient way as for the speed and energy consumption to run that function: whether on Client-Side in the browser with JS or better to do this on the Server-Side and return the value through HTTP with DRF?

Note: Client and server are on the same network.

VLAZ
  • 26,331
  • 9
  • 49
  • 67
Sevasoft
  • 41
  • 1
  • 1
  • 5
  • There is a [question](https://stackoverflow.com/questions/1516852/client-side-logic-or-server-side-logic?rq=1) already answered. But I find the answers are more or less outdated for these days. From that I have an aptitude for using client side function for this example because of ease to implement on both sides. – Sevasoft Feb 15 '22 at 03:33
  • Why would the answers be outdated? I skimmed a few and they all seem quite relevant for today as well. Nothing really major has changed since that question was posted. OK, introduction of WebAssembly is probably one of the larger changes but doesn't sound like what you're doing here. Server-side rendering has also risen a bit in prominence (or perhaps changed, it's not really new) but not quite relevant for what you're asking. Is there a major change I'm missing that makes the answers fundamentally outdated? – VLAZ Feb 15 '22 at 06:07

0 Answers0