Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET MVC - RequireJS best multi-page app solution

I'm trying to convert one of my current MVC sites to using requirejs.....I was able to get things to "work"....but, what I have done looks messy.

Everything I have found on the internet in relation to requirejs really concentrates on single page apps [e.g., John Papa's Code Camper]...HOWEVER, in my case, this is a multi-page app.....and from what I can see, the "main.js" methodology really is only useful for SPA.

I have read over and downloaded Stephan Prodan's implementation of RequireJS server side: http://www.stefanprodan.eu/2012/09/intro-requirejs-for-asp-net-mvc/

I'm not sure if this is the model that will fit best....Does ANYONE have some good models (examples) of what they have used for using requirejs in a multi-page scenario for ASP.NET MVC?

Or....do you think Stephan's approach is sufficient?

I'm stuck and can't seem to actually make a decision and pull the trigger either way.

like image 991
Jeff Avatar asked Oct 22 '22 15:10

Jeff


1 Answers

Try following the guidance for a generic multi-page application here: https://stackoverflow.com/a/10816983/1225352.

That answer references an example multi-page application from the author of requirejs here: https://github.com/requirejs/example-multipage

like image 136
user1225352 Avatar answered Jan 02 '23 20:01

user1225352