locked
What is the recommended javascript front end for asp.net vc core RRS feed

  • Question

  • User-540818677 posted

    We are planning to start developing a new web application, as we chose the following technologies:

    1. Asp.net CORE MVC

    2. Entity Framework

    3. Sql Server 2016

    but we did not settle on the front end tool used, we have these 3 options:

    1. Angular

    2. React js

    3. Run the front end using pure jQuery and bootstrap, without using dedicated front end framework..

    so can anyone advice about the advantages and disadvantages of each approach?

    Thanks

    Thursday, June 25, 2020 5:55 PM

All replies

  • User475983607 posted

    MVC, React and Angular solve the same problem.  If you pick React or Angular then you'll want a service like Web API not MVC.

    so can anyone advice about the advantages and disadvantages of each approach?

    If you are building a SPA then jQuery is not a good option.   I've tried Angular but found it to be a lot to learn.  I like React because React made sense to me.  

    You really should do your own analysis to figure out what's best for you and your team.  

    Thursday, June 25, 2020 6:52 PM
  • User-474980206 posted

    all three solutions require a CSS framework like bootstrap, but you could pick another like material.

    so you are really deciding between jQuery (which almost isn't needed anymore as the browser has most of the features and pollyfils exist for old browsers) and a framework. you should add vue.js to list.

    the type application will help determine. do you plan on SPA or PWA application, then a framework is a good choice. is it an html site, with a little javascript for UI effects, then no framework makes sense. how much ajax & dynamic html are you planning on? How many lines of javascript do you plan on? is the server producing the pages via razor?

    once you decide if you want a framework, then the choice is the coding style. vue and angular are template based, react is component based. react is one way binding, vie and angular are two way. (although both vue and angular have added support the one-way flux pattern). 

    myself I just:

       dotnet new react

    Thursday, June 25, 2020 7:59 PM
  • User-540818677 posted

    MVC, React and Angular solve the same problem.  If you pick React or Angular then you'll want a service like Web API not MVC.

    sorry i have not used any of these frameworks (Angular or React), so you are saying that we can not have React or Angular working with asp.net core MVC?

    If you are building a SPA then jQuery is not a good option.   I've tried Angular but found it to be a lot to learn.  I like React because React made sense to me.  

    but why jQuery is not good options for Single Page application? can you explain this point in more details?

    Thursday, June 25, 2020 8:41 PM
  • User-540818677 posted

    all three solutions require a CSS framework like bootstrap, but you could pick another like material.

    so you are really deciding between jQuery (which almost isn't needed anymore as the browser has most of the features and pollyfils exist for old browsers) and a framework. you should add vue.js to list.

    the type application will help determine. do you plan on SPA or PWA application, then a framework is a good choice. is it an html site, with a little javascript for UI effects, then no framework makes sense. how much ajax & dynamic html are you planning on? How many lines of javascript do you plan on? is the server producing the pages via razor?

    once you decide if you want a framework, then the choice is the coding style. vue and angular are template based, react is component based. react is one way binding, vie and angular are two way. (although both vue and angular have added support the one-way flux pattern). 

    myself I just:

       dotnet new react

    The application i am building have many CRUD operations and dash boards...

    second question, what is the best framework which work with asp.net core MVC?

    Thursday, June 25, 2020 8:43 PM
  • User475983607 posted

    johnjohn123123

    sorry i have not used any of these frameworks (Angular or React), so you are saying that we can not have React or Angular working with asp.net core MVC?

    MVC, React, and Angular are UI frameworks that render dynamic HTML and have model binding.  It makes little sense to use MVC if you plan to use React or Angular.  You can though.   Don't you think it would be beneficial if you set aside time to go through a few getting started tutorials before settling on a framework?  

    johnjohn123123

    but why jQuery is not good options for Single Page application? can you explain this point in more details?

    It is up to you to write the dynamic html and binding framework yourself. 

    Thursday, June 25, 2020 9:01 PM
  • User-474980206 posted

    As frameworks are client and mvc is server almost all work fine with mvc. If you want server prerender, then most of the frameworks require node.js rather than mvc for the client host, but can still call a separate  mvc app. The SPA client with a webapi server  is so popular, that both Azure and AWS support hosting the SPA directly, and the webapi separately, or just SPA  and azure functions or AWS lambdas.

    no one can tell you the best framework for you. We don’t know the requirements, or your teams skill leveL we can tell you our favorite, or most popular (react and angular are popular enough that asp.net core has a template for them, but vue.js is popular enough, that installable templates exist for it)

    You should try to write a sample application in each framework to see which one works best. Vue, react and angular are use similar node tool chains that will create a sample app, much like dotnet mvc

    Saturday, June 27, 2020 4:11 PM