We have a large number of static resources for Skuid. To improve the code management of these resources we’ve zipped them up and included them as a single static resource (ZIP).
Performance wise, it’s always best to include as few external resources as possible on a webpage, however due to the nature of our code (custom jquery plugin, custom runtime base, customized third-party items, etc.) it’s just not practical for us unfortunately. If we could we would be able to leverage the already existing auto-include feature (see https://community.skuid.com/t/reusing-resources).
Within the builder, we have a static resource entry for each individual file that we require on a page. The challenge comes in to play in two areas:
- Quickly identifying which resource is included since the builder display shows the name of the static resource (not inclusive of the path). In our case, if we have 6 static resources, they all show the same name.
- Each page must contain the static resource items even though, in our case, every Skuid page will contain the same set of base static resource inclusions.
- Resource Identification
- Add a “friendly” name property to the static resource and show that in the display in addition to or instead of the name of the static resource itself. If the “friendly name” is empty, the display could default to the name of the static resource
- Add the ability to include multiple paths to a single static resource instead of just a single path.
- Resource Inclusion
- For the auto-include feature, if the MIME Type of the resource is application/zip, walk the zip recursively (is this even possibly in Apex? Performance would be a concern too, possibly a way to cache the result?) and include each file in the archive.
- Add an ability to define global static resource includes (Skuid Settings maybe??).
As an aside, for those that haven’t stumbled upon MavensMate for Sublime Text and resource bundles, I’d highly recommend you check them out.
Thank you!