Skip to content

[Enhancement]: Pivot away from ClientDependencyFramework #6643

@donker

Description

@donker

Is there an existing issue for this?

  • I have searched the existing issues

Description of problem

The Client Dependency Framework that DNN uses is a fork of the original project. This project is marked as deprecated and has not had any maintenance for 4 years.

Description of solution

I see one of the following options to get us out of this:

  1. Maintain CDF ourselves in case issues arise (current situation)
  2. Look for an alternative (there is a more modern product created by the original maker called Smidge)
  3. Roll our own

I'd like to propose and expand on 3. The CDF takes care of:

  1. Keeping a list of JS and CSS files to include.
  2. Managing where these resources are injected (top or bottom of page)
  3. Ordering these resources
  4. Adding a version nr to aid in caching and upgrades
  5. Minification and compression (optional)
  6. Bundling (optional)

By default we only use the first 4. 5 and 6 are optional.

Bundling

Bundling has become obsolete with the adoption of HTTP/2. It is also debatable when considering we are a web application framework and what the user needs in terms of assets changes depending on their access and what is installed. This begs the question whether this is something we should offer/pursue.

Minification

I'd like to make the case that minification should really be a concern of the developer and not the framework. In today's world, most developers no longer write plain JS code that is sent to the browser as is. Instead they use frameworks and tools to transpile their work before it goes live.

Without the need to minify or bundle the question arises why we don't do our own CDF with just the aforementioned 4 features. It would greatly simplify matters.

Description of alternatives considered

See text above

Anything else?

No response

Do you plan to contribute code for this enhancement?

  • Yes

Would you be interested in sponsoring this enhancement?

  • Yes

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions