This post was imported from FARMCode.org which has been discontinued. These posts now exist here as an archive. They may contain broken links and images.
I’ve posted a new Beta release on CodePlex, you can get it here: http://clientdependency.codeplex.com/Release/ProjectReleases.aspx. On the releases tab includes a sample web site that has most of the functionality that you can do so please download it for a documentation reference. Newest changes & additions
- Namespace and codebase changes/steamlining
- Proper versioning added
- Versioning is done on a global basis in the config
- Old versions are retained and can still be accessed from the Client Dependency URL that was previously used (if necessary)
- Versioned composite files names are prefixed with the version number (i.e. version 2 files will be prefixed with '2_') so it's easy to figure out which files are old
- The composite file map also reflects which composite file sets are under a specific version
- Provider model extended to support 2 types of providers:
- File Registration Providers
- Still comes with 2 providers: page header provider and a lazy loading JavaScript client based provider
- Composite File Providers:
- Comes with the standard provider: CompositeFileProcessor
- You can implement your own provider to customize the way that files are combined, compressed, minified, etc... if the standard provider isn't exactly what you are after
- Forced providers! You can now force a dependency to use a particular provider. This can be useful if you want to ensure that a particular script or stylesheet is rendered on to the page differently. For example, you may want to ensure that a script is lazy loaded (using the lazy load provider) but the rest are rendered in the page header.
- Utility methods added to the ClientDependencyLoader for more dynamic implementations
- A test website is included in the release which doubles as documentation, it includes:
- Standard page header provider example
- Forced providers example
- Lazy load provider example
- Dynamically registering dependencies in your code behind
- Registering dependencies with attributes and via aspx controls
Things //TODO:
I’ve finished off versioning so at least i can cross that off from the previous list. But there’s still more to do:
- Implement functionality for jQuery CDN
- This will be a new control/attribute to easily include jQuery in your project
- You will have the option to select which CDN you want to use (Microsoft or Google), or you can supply an address (like your own CDN/web server)
- Though this framework will be included in Umbraco 4.1, we’ll be leaving this functionality out of the Umbraco build as we realize that there are quite a few installs that operate behind a firewall that won’t have access to the CDN.
- Implement skeleton for Microsoft AJAX 4 CDN
- Again, this will be another new control/attribute to easily include Microsoft’s new brand of AJAX with their CDN solution
- Add support for MVC
- Support for JS/CSS Minification with options to disable per dependency
- The reason this hasn’t been implemented yet is that I’ve found a lot of scripts/stylesheets break with minification so we need to be able to turn this on/off on a per file basis
- Some more documentation/examples in the example web application