1

I would like to know a good approach to develop a growing web application which consist in a large set of javascript files, depending on the screen.

I've searched without success...

In this site, i have some solutions: http://addyosmani.com/blog/large-scale-jquery/

I got the RequireJs as a good start point.

But... to the point... I'd like a feature where can be found in the php framework called Yii.

Its way to handle a bunch JS files is very simple. I tell to the framework, which file i need in a specific View, or Partial. The framework renders to me without duplicatin any include script tag.

Is there any feature like that in ASP.MVC framework? Or anything like that? I think i could do this making a Helper, don't know if it is a good way to handle thousands and thousands screen with plus thousand javascripts.

1 Answer 1

1

Telerik use a HtmlHelper extension to do this:

    <%:Html.Telerik().ScriptRegistrar().DefaultGroup(
         grp => grp.Add("telerik.common.min.js").Add("telerik.draganddrop.min.js")
                    .Add("telerik.window.min.js")).jQuery(false).Globalization(true)%> 

<%

but obvioulsy you're not going to get intellisence if you do this.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.