C
C
carcw2019-03-12 14:59:59
Backend
carcw, 2019-03-12 14:59:59

What language/framework should I choose to develop a backend for a SPA application?

Good afternoon!
I started developing a SPA web application (purpose: CRM/workplace), I plan to use VueJS + TypeScript on the frontend.
The backend must be a REST server, in the future it is possible to switch to a Web Socket connection. I can not decide on the choice of language (technology) on the basis of which to develop it.
At the moment I'm considering NodeJS or Java.
NodeJS is attracted by its simplicity, a single language with the frontend. The disadvantages are the lack of rigid typing and OOP structures (partially solved by ES6 and / or TypeScript), performance (they write that it is lower than in Java, if you do not use bindings to C / C ++ libraries).
In Javaattracts the usual OOP, strong typing. But at the moment it is not yet clear how to implement a REST / WS server in terms of multithreading. Do I need to implement multithreading and manage threads and distribute the load myself? Is multithreading implemented under the hood in REST and similar frameworks so that I don't have to worry about it? Or is it generally possible and necessary to use the asynchronous approach here, as in NodeJS?
I would like to hear the pros and cons regarding nodejs and java for solving this problem, as well as good practices.

Answer the question

In order to leave comments, you need to log in

6 answer(s)
A
Andrey Okhotnikov, 2019-03-12
@tsepen

If on the Typescript front, it makes sense to use the same thing on the back, it's convenient and reliable. It is convenient to work with sockets, the performance is good, it consumes less resources than java, it is faster to develop, you can use server rendering for vue, in general, the choice is obvious.

S
Sergey Nizhny Novgorod, 2019-03-12
@Terras

1) Java - seriously? You will spend two weeks stupidly figuring out how to raise a hello-word on a conditional Spring. Just the same amount to set up mavin, connect the database and create the first batch of classes. All this will be accompanied by anal pain and doubts about whether you are stupid for an hour, and why you need all this.
Ps Java is the bloodiest technology there is. They pay good money for it precisely because you can set everything up there, and you will set everything up.
2) If you want something simple and convenient, take

  • Django + Django Rest/ (if you can in python)
  • Symfony (the lifting itself and all sorts of autowarings are not very simple, but the rest is written nicely)/
  • .net Core (there, surprisingly, rest applications are raised very simply).

D
Dmitry Terentiev, 2019-03-13
@mtix

I also wondered about the performance of java, nodejs. Good, detailed answer found here .

D
Dmitry Makarov, 2019-03-13
@MDiMaI666

look here if you need a ready-made vue + laravel + websocket solution on the node
https://github.com/iluminar/goodwork/blob/master/r...
there are still a lot of useful pieces. I picked it up but never used it. I did not like.
I also have a solution that we can discuss with you. if interested
, write to [email protected]

A
Alisher Aidarkhan, 2019-03-12
@alikenski

It depends on the project. For such a project, I would use NodeJS (Express) and further connect socket.io

D
devalone, 2019-03-12
@devalone

go

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question