1

I spent the last couple of days figuring out what development stack to use for the interactive student platform I'm planning to build.

I figured out that the MEAN stack may suit the job very well. However, I face a dilemma whether to use Node.js as backend technology for the application:

Reasons to consider Node

  • The backend will mainly consist of realtime components. E.g. collaboration tools, notifications, etc.
  • These components will handle this data concurrently
  • It will scale better than a conventional server-side programming language such as PHP
  • Exposing the data with REST for e.g. a mobile applications will be a breeze
  • Having one data format (JSON) in the front- and backend will speed up development.

Doubts

  • Some components require computation. Although not that complex, it may slow down the application.
  • Although the application is mostly a single page application, the application will (in a later stage have some features that Node seems not typically suited for. E.g. a payment workflow.

I already made the switch from a previous approach, so this time I want to be sure to choose the right approach. Will Node.js be the right choice for this application, or will a, for example, PHP backend with Laravel suit the job better as the application matures?

jroeleveld
  • 456
  • 4
  • 12
  • 22
  • Well you won't be building a payment system yourself right? In that case I imagine the technology you choose doesn't matter much. – Whymarrh Nov 02 '14 at 11:25
  • Not the connection to the bank of course, but if integration with other components of the system is required, it is a different story, right? – jroeleveld Nov 02 '14 at 11:30
  • I'm not exactly sure what you mean by "integration with other components of the systems"? Node is no different (at a high level) from any other server language: it can handle requests and send responses. – Whymarrh Nov 02 '14 at 12:45
  • 1
    Integration with paypal/stripe or braintree or practically ant payment provider is very well documented and normally would provide a rest api + some kind of token management, I've been working with payment gateways with node for over 3 years. Also checkout shopify + node.js - here is a cool tutorial - http://blog.codezuki.com/blog/2014/02/10/shopify-nodejs - it might simplify alot of your work load. – Lior Kesos Nov 03 '14 at 06:38

1 Answers1

1

I think there's a whole range of possibilities you're not considering, for example it's a perfectly valid approach to use Node for some of the back-end (e.g. connections to third parties, managing the UI, handling concurrent users) while delegating some of the back-end to other components that are more suited (e.g. components that require heavy computation).

That said, I don't see anything you describe in your 'doubts' as being particularly non-nodish. The computation stuff you say will be lightweight, but my recommendation there is to treat it like any other async task, then if you decide later that it is a problem (e.g. slows down the app) it's pretty trivial to extract that out into either a separate Node process (therefore not blocking your main app's event loop) or use a component built in your language of choice (Java, .NET, C, Perl, whatever) as described above.

I don't understand why you suggest a workflow isn't something Node is suited for. I've seen and built a number of them in Node and other frameworks, it's no less suited for it than any other framework, and better than some.

Paul
  • 35,689
  • 11
  • 93
  • 122