locked
Javascript library to use with asp.net mvc (non-spa & also no npm/nodejs) RRS feed

  • Question

  • User1071313914 posted

    Hi!

    I'm working on an asp.net mvc project (yes not .net core mvc) and I was wondering if you guys have any suggestion which javascript library to use?

    I would'nt want to use javascript frameworks with npm. The current project template comes with Jquery and bootstrap but the UI mockup has Order, order line items(master/detail). can this be achieved using jquery alone? but there seems to be a need for two way data binding and it might be tedious using jquery on this. you guys any ideas?

    Wednesday, March 3, 2021 12:17 PM

All replies

  • User475983607 posted

    I integrated React into a few pages of an existing application.  It took a little bit of practice to get the hang of React.  Most of the technical support I needed came from the React site.

    https://reactjs.org/docs/add-react-to-a-website.html

    Wednesday, March 3, 2021 12:48 PM
  • User1071313914 posted

    Hello. thank you for your reply. I took a look on it. but it seems that to get the JSX to work you're gonna need to reference babel js on the page.

    then on the "Quickly Try JSX" section they said it is not suitable for production

    "This approach is fine for learning and creating simple demos. However, it makes your website slow and isn’t suitable for production. When you’re ready to move forward, remove this new <script> tag and the type="text/babel" attributes you’ve added. Instead, in the next section you will set up a JSX preprocessor to convert all your <script> tags automatically." jsx preprocessor requires that u use npm. 

    Wednesday, March 3, 2021 1:02 PM
  • User475983607 posted

    patrickp87

    Hello. thank you for your reply. I took a look on it. but it seems that to get the JSX to work you're gonna need to reference babel js on the page.

    then on the "Quickly Try JSX" section they said it is not suitable for production

    "This approach is fine for learning and creating simple demos. However, it makes your website slow and isn’t suitable for production. When you’re ready to move forward, remove this new <script> tag and the type="text/babel" attributes you’ve added. Instead, in the next section you will set up a JSX preprocessor to convert all your <script> tags automatically." jsx preprocessor requires that u use npm. 

    I read more than one page and do not have these issues.  However, I do use npm to install libraries and Babel for browser compatibility.  I'm quite happy with the results.  

    Too bad React is not a good fit for your application.  Good luck on your search.

    Wednesday, March 3, 2021 1:16 PM
  • User1071313914 posted

    yeah I just dont wannt use npm. Thank you.

    Wednesday, March 3, 2021 1:35 PM
  • User-474980206 posted

    Not sure why you don’t want to use the node tool chain. But the vue.js works well as a stand-alone library. It’s template based and it’s tutorials don’t require a tool chain. Most of the jquery based libraries have gone out of favor or like jQuery-UI are no longer supported.

    note: I use react, but would not use it without the node tool chain.

    Wednesday, March 3, 2021 3:29 PM
  • User1071313914 posted

    Hi Bruce. Thank you for your reply. Yes I would'nt want additional npm toolchain on my asp.net mvc app because I think it complicates things. I will look into vue.js it seems interesting.  how about knockout? is it still active? 

    if not jquery ui where will I get datepickers and other widgets?

    Thursday, March 4, 2021 6:59 AM
  • User1312693872 posted

    Hi,patrickp87

    You can check the examples such as how to get datepickers or other widgets in this site:

    https://vuejsexamples.com/a-datepicker-component-for-select-persian-date/

    But the vue.js can not replace the jquery, they are two things.

    Best Regards,

    Jerry Cai

    Thursday, March 4, 2021 10:02 AM
  • User-474980206 posted

    Hi Bruce. Thank you for your reply. Yes I would'nt want additional npm toolchain on my asp.net mvc app because I think it complicates things. I will look into vue.js it seems interesting.  how about knockout? is it still active? 

    if not jquery ui where will I get datepickers and other widgets?

    if you pick a component framework like vue, you will want vue components not jquery. If you pick a jQuery plug-in you may need to wrap it for the framework. Also you should pick a css framework. You will want components compatible with the css framework.

    Knockout is still supported, but not gaining in popularity.

    you need to decide the use of JavaScript in the site. Is the site mainly static html with some effects, may just an addition input type like a data picker. Or do want a dynamic page that is written in JavaScript. The more you want a mobile style  app the more you should look at the latter.

    Thursday, March 4, 2021 3:43 PM