How do I take a set of dependencies and model them as a serial and parallel actions?
For example:
U1 depends upon U2
could be a serial representation of
S: [U1, U2]
U1 and U2 are not dependent would be a parallel representation.
P: [U1, U2]
S means serial, and P means parallel. In this example U refers to a URL that points to a resource.
In parallel resources the ordering does not matter. In serial resources the ordering does matter.
I'm trying to build a resource loader.
It only needs to work with the local server. Also, it only uses Ajax get requests to load resources.
But I want to a language/syntax to model the complexity of dependent resources.
Clarification and Examples
This is for learning/later implementation. No outside libraries unless you can relate the syntax they use for loading to the question.
Example 1
Jqueryui depends upon jquery. This would be represented as...
S: [U-jquery, U-jqueryui]
Example 2
jquery.js does not depend upon underscore.js. This would be represented as...
P: [U-jquery, U-underscore]
Example 3
backbone.js depends upon both underscore.js and jquery.js
P:[U-underscore, U-jquery] // group1
S:[some_notation to represent group1, U-backbone.js]