I have an ASP.NET MVC Framework project. It's time to move the client part to modern React. The project is very big. How to organize all this correctly or can you share the project on the GitHub?
Foundation task. Do it together with ASP.NET MVC. What would both fronts work together on the same site. What would create the React routing and not break the current ASP.NET MVC routing?
If you want to use React or any SPA framework it means that you need to use SPA(Single Page Application) approach of building WEB application.
Please see more about this here:
https://developer.mozilla.org/en-US/docs/Glossary/SPA
Here are general advices:
Backend: Since you use ASP.NET MVC it would be flexible and easy to migrate your backend part to ASP .NET WEB API ( build REST endpoints). As contrary to MVC Razor pages approach, WEB API Controllers will return data, not a view.
Of course you need to revise you logic at backend side and transfer from Razor pages required pieces of code that related to handling data etc.
Frontend: Create a simple React application(here you can see the guide):
https://reactjs.org/docs/getting-started.html
You React application will send requests to the new WEB API Controllers not to MVC Controllers. Once you receive data from the backend side, store it and handle it at your Client-side.
For storing your data I highly recommend you to use Redux Store:
https://redux.js.org/api/store
Routing: React has router https://v5.reactrouter.com/web/guides/quick-start using this router you will render and manipulate you pages on client side without page-refreshing according to the SPA conception, hence, no need to worry about your MVC routing.
Example of application you can find at official page here:
https://reactjs.org/community/examples.html . But I think once you complete the guide, this question is going to be skipped.
I want to learn React.js, but most of the tutorials show how to integrate ASP.NET Core Web APIs with React.js, while I did not find any tutorial for using React.js with ASP.NET Core MVC. Any advice? Can I assume that React.js works only with ASP.NET Core Web APIs, where React.js is used to consume the JSON returned from the API?
I want to learn React.js, but most of the tutorials show how to
integrate ASP.NET Core Web APIs with React.js, while I did not find
any tutorial for using React.js with ASP.NET Core MVC. Any advice? Can
I assume that React.js works only with ASP.NET Core Web APIs, where
React.js is used to consume the JSON returned from the API?
No, the react.js could work with Asp.net core web API and the Asp.net core MVC. In this scenario, the react.js act as the Front-End, and the API and MVC controller will act as the backend.
To answer the question more clearly, we need to understand the concept of front-end and back-end separation. As we all know, in the MVC pattern, it can be divided into data layer, logic layer and view layer. This view layer is what we call the front-end, which is mapped to the code level, namely, HTML, JS, CSS and other code files. The data layer and logic layer are more back-end parts. These files will be in a project and will not be developed, tested and deployed separately.
For the Front-End separation application, front-end and back-end are separated in different projects. The front-end has special front-end developers to develop and test, while the back-end has back-end developers to develop and test. They interact with each other through API.
So, to create the Front-End separation application, most developers will choose to create a React.js(Angular.js or Vue.js) application as the front-end application (because the React is a JavaScript library for building user interfaces) and use Asp.net core project as a back-end.
To use the React.js with Asp.net Core MVC application, you could use the React project template create a Asp.net core application (choose the react template when create Asp.net Core application via visual studio), then, in the React page, you could call the MVC controller to get data (it is similar with the API), after that render the data. Like this:
We use Web Api with angular framework or react so that we can bind data coming from the database with the angular or react controls in easy way by just calling HTTP services.
If you are planning to use normal mvc web application, you can do that, but real question is how will you transfer data coming from database in your mvc controller to angular or react components
Assuming I have already built out my application's server-side backend in PHP 7/ Laravel and browser front end in Angular JS... what frameworks should I use when I then want to start developing iOS and Android native apps?
How can I avoid redundant code (DRY) on different frameworks when hooking new mobile apps into my already existing backend?
Most of the information that I find on this subject mentions implementing WebViews (HTML5/JS) in the native app. I also found Apache Cordova for "cross-platform development." https://cordova.apache.org/docs/en/latest/guide/overview/
I've been using Ionic Framework for the past year and it has been pretty decent
http://ionicframework.com/
(Disclaimer: I'd have asked this question in a forum but the react-native website encourages us to ask it on SO.)
Is there a known tool to visually preview xml layouts in a browser? I'm developping a scaffolding tool to generate basic templates so I can prepare applications for customers quicker, and I'd like it to be a web app. Since the layout is very similar between react-native and reactJS, I'd think the effort to show a react-native layout as a reactJS layout is minimal?
A framework for building web apps with React Native compatible API
https://github.com/taobaofed/react-web
I have found this amazing AngularJS based template that I would like to use, which currently is build to be launched as a Node.js application and then there is a ton of data that I have in a dozen tables that I am planning to wrap with a Django REST framework.
Eventually the UI application would communicate with the Django REST framework. Do you think this is a good idea. Or should I just stay on one of the frameworks? I would like to hear both pro's and con's from people with expertise on both the frameworks.