8

I came across this joke the other day. Someone on the internet was asking why do we need a backend, just connect the frontend to the database.

It seemed funny at first, but really is it possible to create a framework which handles frontend and backend at the same time?

Routing and listing views or grids all happen in the same function.

Technically I can't think of a reason why not!

1

2 Answers 2

13

Technically you can, but practically its useless for any serious applications, Some reasons from top of my head -

  • At some point, you will expose all your credentials in browser.
  • If you have any novel algorithm, which run's in backend, now you have to expose them to everyone.
  • Your database is exposed, anyone can query the data from your db, just by running a db query in browser console, which exposes other users data too.
  • Authentication & Authorisations are big joke, if you have no backend.
  • Think of big applications like amazon, 100s of services, developed and deployed independently, in different languages, all at once in browser ? and only in javascript ? The client machine will die.

Many more.

2

Short answer is yes, it is pretty much possible. However, it is not secure at all.

Simply, you will keep database username and password in client side, which is quite silly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.