Last post Oct 01, 2017 07:19 PM by bruce (sqlwork.com)
Sep 30, 2017 08:06 AM|bluMarmalade|LINK
Hi, I'm thinking of making a website with react and asp.net core.
2) When publishing the application, do the server (IIS on windows server 2012) need to have node installed for the application to run?
3) Using an asp.net core backend api like the template, is that noticably slower than using node.js as the backend?
4) Which of Angular, React or Vue do you have best experience with to work with asp.net core (you're welcome to be subjective)?
Oct 01, 2017 07:19 PM|bruce (sqlwork.com)|LINK
react as a jsx compiler that converts .jsx file into js file. see:
plan js extension), and a typescript file with jsx code is named .tsx.
because I picked react, I prefer using ES6/Babel rather than typescript. most examples and supporting libraries also written in ES6. and again, the react/redux trend is to functional, rather than class solutions.
is easiest if the UI web server is node, but there are asp.net core razor components, to have asp.net core call a running node server to do this render (see the .net core spa services). in this case node is required on the server.
the .net core sample template uses spa services (core to node.js), so node must be installed on the server.
asp.net core is finally faster than node.js (they use the same library). this is because asp.net core allows more request threads (one per processor). if you are using spa services (as the template), then there is the small overhead of the asp.net core calling
the node web server.
I use react/redux/es2017 via webpack/babel tool chain, but not spa services yet.
You can easily change the webpack.config.js to use babel rather then typescript for compiling (of course you will need to convert the .tsx files to es6, but pretty trivial. there are a lot a starter templates, for core, but the spa example (other than using
typescript) is very feature complete (watch, pre-render, vendor file, and css support). If you don't want node on the the production server, just remove the re-render helper tags.
I'm looking at using spa services or node.js as the web server and asp.net core as the middle tier. Both Vue and angular are template view engines (Vue looks like a better angular), and I prefer react's component based view engine. I have also played with
react-native to produce a mobile app, but still code my IOS mobile apps in swift.