Graph - Modeling dependencies into parallelism/serialism
<p>How do I take a set of dependencies and model them as a serial and parallel actions?</p>

<p>For example:</p>

<p>U1 depends upon U2</p>

<p>could be a serial representation of</p>

<pre><code>S: [U1, U2]
</code></pre>

<p>U1 and U2 are not dependent would be a parallel representation.</p>

<pre><code>P: [U1, U2]
</code></pre>

<p>S means serial, and P means parallel.  In this example U refers to a URL that points to a resource.</p>

<p>In parallel resources the ordering does not matter.  In serial resources the ordering does matter.</p>

<p>I'm trying to build a resource loader.</p>

<p>It only needs to work with the local server.  Also, it only uses Ajax get requests to load resources.</p>

<p>But I want to a language/syntax to model the complexity of dependent resources.</p>

<p><strong>Clarification and Examples</strong></p>

<p>This is for learning/later implementation.  No outside libraries unless you can relate the syntax they use for loading to the question.</p>

<p><strong>Example 1</strong></p>

<p>Jqueryui depends upon jquery.  This would be represented as...</p>

<pre><code>S: [U-jquery, U-jqueryui]
</code></pre>

<p><strong>Example 2</strong></p>

<p>jquery.js does not depend upon underscore.js.  This would be represented as...</p>

<pre><code>P: [U-jquery, U-underscore]
</code></pre>

<p><strong>Example 3</strong></p>

<p>backbone.js depends upon both underscore.js and jquery.js</p>

<pre><code>P:[U-underscore, U-jquery] // group1
S:[some_notation to represent group1, U-backbone.js]
</code></pre>
