Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Yes, there has, at least in some portion of the community, not sure how you'd measure it overall.</p> <p>There are <em>definitely</em> advantages, off the top of my head:</p> <ul> <li>Cleaner / Less code</li> <li>Easier to debug</li> <li>Easier to change</li> <li>Easier to package</li> <li>Performance</li> </ul> <p>From sheer volume, think of this:</p> <pre><code>&lt;a onclick="someFunction();"&gt; &lt;a onclick="someFunction();"&gt; &lt;a onclick="someFunction();"&gt; &lt;a onclick="someFunction();"&gt; &lt;a onclick="someFunction();"&gt; </code></pre> <p>Or this <strong>once</strong>:</p> <pre><code>$("a").click(someFunction); </code></pre> <p>You can do this with most frameworks via a css selector, etc, handles many elements at once. This means in server code you're just assigning IDs and classes, the client side is easier to handle separately. It's easier to debug as well, for example: in the console I can do <code>$('a').unbind('click').click(...something new...);</code></p> <p>Another benefit is <strong>performance</strong>. If I can split this into a separate <code>.js</code> file, cached by the client, that's thinner webpages and extra data I'm not sending every time. Smaller web page = faster load.</p> <p>Here's one more example, thinks about how simple it is, granted some framework action via jQuery going on, but how would this look with inline events?</p> <pre><code>$("li").hover(function() { $(this).children().slideToggle(); }); </code></pre> <p>Comparatively, that's a <em>tremendous</em> amount of inline code, even if you leave out the animation portion it's messy (think <code>mouseenter/mouseleave</code>, not <code>mouseover/mouseout</code>...the former, which <code>.hover()</code> uses, is more complicated)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload