What's the best architecture for an enterprise Node + js application ..?
I am new to Node and responsive to js and I need to build an application using both of them. Therefore, I have 2 ways to create this application:
-
Split Node and edit setup: all frontend development in js response setup with separate ja Node js setup for server.
-
Combine Node with react js: Integrate react in Node js and build your app using this combination.
There will be many hits in this application, and I want to know which architecture will work best:
Refuse the request to Node internally (in architecture 1), will it be slow .. ??
I ask for advice .. !!
source to share
Your React app will have to send requests to your Node app anyway, now it matters if you combine the two or not.
I always recommend creating frontend and backend separately for several reasons. First, you will need to think and hopefully document the API that will connect both of these projects, without any special changes to the backend every time you make changes to the interface and vice versa. In addition, you can easily add other interfaces like mobile app or desktop app if you have a well-defined API.
But you can also do it differently and have a more monolithic application that will still be composed of external and internal parts, but more closely related. And regardless of whether it is a clear abstraction boundary and loose coupling, the advantage that it costs a little more to construct in the entire project is entirely up to you. It usually pays off after a while, when your application gets complex and when you want to add a mobile application or other interfaces.
source to share