Can we develop a 100% Javascript/HTML/CSS web application without backend?

Asked

Viewed 2,404 times

4

I am a developer backend Java and always used Javascript on frontend for the purpose of giving dynamism and better interaction to HTML pages (I have always developed corporate systems).

Is there any way to develop a 100% Javascript/HTML/CSS enterprise system? Where would be the rules and objects of the business (the model on MVC)? You would have to use Node.js on backend?

  • These frameworks and libraries you mentioned are all frontend. If your fronts are already in html/css/js, they will still be. The backend can use anything if it is not required to use js. And is responsible for the persistence of data and usually much of the business rules.

  • Did the answer solve your question? Do you think you can accept it? See [tour] if you don’t know how you do it. This would help a lot to indicate that the solution was useful to you. You can also vote on any question or answer you find useful on the entire site.

1 answer

2

First, you seem to believe that there’s only one way to do things, that there has to be MVC.

You can do whatever you want any way you want. Of course some things are more suitable than others for certain scenarios and some options can be too much work, offer less than expected or require what cannot be offered.

You can make a game, an individual-use application that doesn’t need server contact. But I would make these native applications (desktop/mobile), have who prefers web to everything. The user will have a suffering experience most of the time for no major gain.

Is it possible to have a client based on Electron to dispense with the browser, but do not like the results in much of the cases.

It’s even possible to make a network of communication between several clients, but I don’t think it’s worth.

There are several reasons to have a server and not trust the client.

If you really need a server, and enterprise applications often need one, then the only popular option is to use Node.js (now you have Node.js Deno). There are other implementations, but none that I can speak of, I doubt any are useful except in a specific niche.

Of course you will need a database server as well. Possibly other things, including an HTTP server.

If Node is the best option for the problem, you can use it. If the reason for choosing it is because you only know Javascript, then the reason for choosing it is wrong.

From what I understand, most of the time, if the Node/ Deno meets well, MVC is cannon to kill bird. But may be changing a little.

It may exist, but I’ve never seen a good corporate system written with web technologies, at most use HTTP for communication like fallback when there is no other option. This actually applies to any application running in the browser. Some applications are saved using the Electron or a competitor of it. But you can do better native.

Of course, not everyone demands something good, otherwise there wouldn’t be so many people wearing something like this. A tip, I make systems since the 80’s and at that time users were much more productive.

But it’s possible, and there’s a lot of people doing.

  • I have nothing in mind to do, I’m just studying and I was in doubt where to put business rules and business objects in a development model using Javascript/HTML/CSS. I know that there are several solutions for the same problem. I only used MVC as a way to illustrate my doubt. Being more hardcode... having a rule like: if the balance is greater than X do it. Where this rule is on a system 100% Javascript/HTML/CSS?

  • If you will have a server, it is the same as what you do in Java, of course each framework is different. If you’re not going to have a server I don’t see much advantage in having a ceremonious system, then the simplest possible is better. Interestingly the biggest advantage of MVC is virtually not used

Browser other questions tagged

You are not signed in. Login or sign up in order to post.