Skip to main content

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:

  1. 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.
  2. 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.
A few ideas:
  1. 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.
  2. 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 always, appreciate the consideration and feedback is always encouraged.

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!

Some further thinking on this…

There has been some talk on other threads regarding global action sequences where you could define an action sequence and “use” it on pages.  Along these lines, what about a global resource management concept.  Something along the lines of:

1) Be able to define a “resource bundle” at a global level via admin area
2) The bundle would point to one or more static resources and each static resource included could contain one or more paths to locations in the static resource
3) The bundle would have a name
4) The bundle would have a property that would indicate whether or not it should be auto-included on every page

Something along these lines gives the best of both worlds - you can “re-use” a bundle globally or if you don’t want global and only certain pages (but it’s still the same on each of those pages), you can still reference the global bundle via the resources tab on those pages.

Just food for thought 🙂