Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Incidentally you can write a fluent API in VBScript. I built a library to facilitate inline creation of HTML to avoid the "tag soup" garbage and I'm using it in an app right now (that's how I found this question).</p> <p>Here's an example with a couple helpers wrapping the 960gs grid:</p> <pre><code>with html .open with head .open stylesheet_link "assets/stylesheets/960gs/reset.css" stylesheet_link "assets/stylesheets/960gs/960.css" stylesheet_link "assets/stylesheets/960gs/text.css" stylesheet_link "assets/stylesheets/app.css" .close end with with body .open with grid_container(12) .open call main .close end with .close end with .close end with </code></pre> <p>And then main could be similar to this:</p> <pre><code>with grid_row with grid_column(4) .id "nav-left" .open with ul .open li.open.contains( link_to("Google", "http://google.com") ).close li.open.contains( link_to_if(a &gt; b, "Microsoft", "http://microsoft.com") ).close li.open.contains( link_to_unless(a &gt; b, "Apple", "http://apple.com") ).close .close end with .close end with with grid_column("8 push_2") .id "main-content" .open h1.open.contains("Title Here").close do until recordset.eof p.class("record").open.contains(recordset("column_name")).close recordset.movenext loop .close end with end with </code></pre> <p>The way the lib is written it could generate XML with essentially zero effort, basically any tag language that has the "nested elements with attributes" structure.</p> <p>Classic ASP looks the way it does because the people who use(d) it and the people who made the tutorials just threw it out there and didn't fully understand the language and good practices. So we are stuck maintaining meandering code vomit. But if you do it right it can start to look like ruby. Heck I even implemented some ruby iteration stuff using dynamic vbscript classes a few years ago just to see if I could do it and it worked, but I lost that code a long time ago. Point being that even though vbscript is limited it still has more capability than people give it credit for, they just usually don't do things as well as could be done.</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.
 

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