Javascript Modules – Useful or Unnecessary?
-
Javascript Modules – Useful or Unnecessary?
Javascript Modules – Useful or Unnecessary?Follow
1. Javascript Modules – Useful or Unnecessary?GOLD CONTRIBUTOR
Lucas Hewitt
Posted Jan 17, 2022 02:53 PM
I currently use namespaces for my JS files after reading through some best practices for custom D365 CRM code.However, I recently ran across a post that mentioned that modules, not namespaces, are now the preferred way of packaging code. Looking into this, I’m confused about a few things:
If the goal is to decrease load time, don’t all the libraries included on a form get downloaded regardless? So packaging code into separate modules wouldn’t improve load time, correct?
If the goal is to decrease or manage dependencies, don’t all libraries get loaded before the UI loads, so that wouldn’t be a concern?
Would a “helper file” with a namespace work just as well or the same as exporting/importing modules?
Thanks for the help!——————————
Lucas Hewitt
Enterprise Application Specialist
Ethnos360
——————————
Sorry, there were no replies found.
The discussion ‘Javascript Modules – Useful or Unnecessary?’ is closed to new replies.