Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any good example to use requireJS in asp.net mvc application?

I have an asp.net mvc application (Not single page) and try to apply requireJS and look for good examples to apply the pattern. I have read a couple of blog posts, but didn't find any good examples. If you know any good examples or can offer some good advice, I would highly appreciate it.

like image 350
J.W. Avatar asked May 27 '13 17:05

J.W.


2 Answers

take a look at this one, I think its well explained. https://web.archive.org/web/20150502094922/http://tech.pro/tutorial/1156/using-requirejs-in-an-aspnet-mvc-application

like image 150
Rayweb_on Avatar answered Oct 23 '22 19:10

Rayweb_on


There is no difference if it's ASP.NET MVC, Java, Ruby or anything else. JavaScript is a client side. I would say if you want to properly use RequireJS, forget minifiers, bundles and all that ASP.NET specific stuff. Have node on your build server and make it part of the build process to optimize using r.js.

I recently blogged about it: Understanding AMD & RequireJS

like image 5
Tomas Kirda Avatar answered Oct 23 '22 21:10

Tomas Kirda