Home>

Hello. I am interested in how to build an application architecture on AngularJS so that it is scaling.

Main requirements:

  • single-page -everything should be through hashroring
  • impactations of representations, everything should be built by some nested controls that are collected in holistic pages.
  • backend on ASP.NET MVC Webapi, which returns /processes data
  • Dynamic scripts /styles

I more or less studied the Angular, but somehow all the bricks are not built into a well-designed scheme. I will be very grateful if you advise something delomet. Thank you very much!

  • Answer # 1

    If you need a directory structure, then yeoman will create a directory tree for you, if this is not what you need and you dealt with AngularJs, I did not understand the question, what do you miss?

    Update

    Who needs this lazy loading if one big file is created in the end that one big file is created?

    Update

    One file is better than 30 small.

    Update

    No, this is not my personal preference. This is due to the way the browser loads the resources of the page. This is not only a javascript, but also styles and graphics are combined into sprites. Maybe I will surprise you, but there is a lot of tools that make these things and they need to use! By Requrejs is a separate question, but I will answer: it facilitates life when developing. This eradicates the problem when jQuery, for example, loaded after a plug-in, which requires it. And also, you do not need to prescribe all the script URLs that are required in HTML. Everything in one place is convenient. Well, there is a mass of other utilities that it gives.

    Most importantly, it is a lazy loading of scripts \

    Eriendel2021-04-24 20:25:13

    Why do you think so? And how is it justified?

    Eriendel2021-04-24 20:25:13

    This is for me as a revelation. I always thought it was more correct to load scripts as they needed than overnight all. But still, is it a generally accepted tactic or is it personally your preference? And this also applies to styles?

    Eriendel2021-04-24 20:25:13

    Maybe I will surprise you, but there is a lot of tools that make these things and they need to use! I knew about this, but I thought it was necessary to combine all the scripts within the page, and not absolutely all application scripts.

    Eriendel2021-04-24 20:25:13

    And why then need Requirejs and why is it so popular?

    Eriendel2021-04-24 20:25:13