Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9144809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:21:39+00:00 2026-06-17T10:21:39+00:00

I would like to start using requirejs on my project which has been in

  • 0

I would like to start using requirejs on my project which has been in development for about a year and it’s big.

The project is asp.net , the masterpage has about 50 scripts , half of them are custom scripts for the project most of them written using the revealing module pattern , the other half are third party scripts and jquery plugins.

There is also a lot of JS code inline in the pages.

I would appreciate if some could tell me what would be the best strategy to refactor the project.
Maybe some way of doing it step by step , so as not to block the rest of the development team.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T10:21:40+00:00Added an answer on June 17, 2026 at 10:21 am

    There is only one good reasons to go for AMD module pattern:
    Safeguard developer’s sanity by splitting JS code into manageable modules.

    There is only one way you can retain the sanity AND still serve compact, efficient pages – you need to “build” your AMD tree. Otherwise all the little modules become a pile of HTTP Get requests slowing your app down.

    One side effect of going for “built AMD tree” in your particular case is that you may benefit from minified JavaScript. Your app is already served by server gziped, but minifying JavaScript makes them even smaller. Plus, separate static JS files have better cache signature compared to aspx files that may have very short cache setting assigned by the server.

    The way to get to “building” an AMD tree:

    1. Take all the large chunks of JavaScript code sprinkled around aspx files and put it into separate JS files. Insert script tags for them into your aspx. Test, insure your app still works.

    2.
    Then turn these files into AMD modules. Retest your app.

    3.
    Then run AMD tree optimizer on the tree to get back ONE long JS file that packs all the AMD modules. Retest your app against that module.

    There is an established leader among AMD build tools:
    https://github.com/jrburke/r.js

    But here is what I would suggest that you try first:
    http://prunejs.com/

    First one requires crafty configuration, lots of patience. PruneJS needs no configuration, but is less flexible than r.js.

    Unless you commit to go all the way – to “building AMD tree” – don’t go AMD. It’s not worth it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been developing my first iPhone app part-time and would like to start using
I would like start with .NET Micro Framework as my hobby project. What hardware
I would like to start a personal project that will give me a lot
I have a project which I would like to make more use of smart
I use the on-demand (hosted) version of FogBugz. I would like to start using
I would like to start an IntentService when pressing on my app widget. I
I would like to start making code patches to Rails. Are there any good
I would like to start with x no. of fields (in my app I
I would like to start a community discussion. As per my question, when do
I would like to start a broadcast receiver from an activity. I have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.