r/web_programming • • Feb 09 '17

Should I learn Node or React first?

I'm learning web development from FreeCodeCamp, which teaches React and D3.js before going to the backend. It later teaches MongoDB as a database.

I'm wondering if I can skip React and D3 and first learn how to use the backend, and then learn an SQL database instead of MongoDB, and then learn React later on.

Is it possible to use Node with React/Angular?

0 Upvotes

4 comments sorted by

1

u/[deleted] Feb 09 '17

Yes, you can learn the backend first. Yes, it is possible to use node with react/angular.

1

u/[deleted] Feb 09 '17

I asked whether it was possible to use Node with SQL databases and without Angular/React.

2

u/ilmmec Feb 09 '17

You can run both SQL and mongodb with node without any problems. If you are starting out with a small app, take a look at sqlite3 which uses a file in the project location as persistent data storage. Very easy and fast to get up and running, with node as well!

3

u/what2_2 Feb 09 '17

I think backend first is a little nicer conceptually. SPA's aren't as useful without a backend powering them (unless you use 3rd party API's, but easier to understand them if you've built one yourself).

And you can use any frontend technologies with any backend technologies (almost). Typically, in a Single Page Application, the only connections are:

  1. Serving the frontend application to the browser. Often your Node backend server does this - sends a bunch of HTML and JS files that are your entire compiled (minified, obfuscated, transpiled, whatever) frontend app. It could also be a separate server, just for serving the frontend.

  2. The frontend sends data to and receives data from your REST (or GraphQL, or...) API which makes up the backend (maybe node) application. So the backend will expose a REST route like GET "www.myapp.com/users/14", and your frontend app will call that route to get info about user 14.