Answer the question
In order to leave comments, you need to log in
NodeJS as front-end?
Good evening, friends and colleagues. I had a question, as a person who learned nodeJS, but did not use it in real projects.
Actually, what is the problem. There is a client-server product. The server is Java, the client is BackboneJS + a self-written wrapper over it, which made it possible to write extensible applications. As a result, we now have about 40 models, 350 views, and about 700 controllers for various actions.
All this is quite realistically supported and works on the client side.
But I have a question with support in the future, the more the project grows, the more difficult it becomes to support it. And frankly, BackboneJS objectively can no longer cope.
Is it possible (is it necessary) to use nodeJS as the side that processes the client and sends requests to the server for complex logic. Those. actually want to replace BackboneJS with nodeJS.
If necessary? Will I lose performance? (Please do not mention Marionette, etc.) Only on a specific issue.
Answer the question
In order to leave comments, you need to log in
angular.js for the frontend and there will be no problems (well, how ... if you don’t create them yourself).
If the java server provides you with Orthodox REST, there should be no problems. If not, then yes, then it makes sense to write a proxy on node.js. Otherwise, you need to refactor the frontend.
nodeJS is not a library, you can't just use it on the client.
Perhaps you need habrahabr.ru/post/224825
At the moment, your workflow looks like this:
As I understood from the question, you want to go to this scheme:
The question is, what kind of load do you want to transfer to this kind of "proxy"?
Node.js is not a panacea, Browserify is not a silver bullet, Angular.js is no better than Backbone.js . The only thing that is important at this stage is to understand whether it is worth complicating the structure of the system? After all, the same functionality can be stored behind a Java server or placed in a separate module, but on the same Java. It is unlikely that your clientside specialists will immediately be able to painlessly write code in Node.js (noodles, crooked third-party modules, one thread for all clients, etc).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question