Instance-First Development (2004)
I love Oliver Steele&#x27;s work with dynamic languages, and have really enjoyed doing &quot;instance first development&quot; with OpenLaszlo, and miss it now that it&#x27;s gone obsolete, because I haven&#x27;t found anything quite like it.<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;OpenLaszlo" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;OpenLaszlo</a><p>It&#x27;s about iteratively programming from the ground up, avoiding premature and unnecessary abstraction, smoothly and rapidly developing prototypes into reusable components and working products, and organically growing and easily abstracting only when needed.<p>I think there&#x27;s still a lot to be learned from OpenLaszlo and applied to new systems. It would be great to inspire somebody to take the idea of instance first development, and run with it in a modern framework.<p>Oliver is an old school Lisp Machine hacker, so OpenLaszlo had a very declarative prototypical Lispy feel to it! Another &quot;dynamic language&quot; Oliver created was Dylan at Apple.<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Dylan_(programming_language)" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Dylan_(programming_language)</a><p>OpenLaszlo was a VERY enjoyable system to work with, because of the way instance first development dovetailed with constraints, prototypes, and data binding, that really got me into an extremely productive groove.<p>Of all the frameworks I&#x27;ve learned about, Svelte seems the most like OpenLaszlo, philosophically. They both have a JavaScript to JavaScript compiler that wires up reactive constraint dependences automatically, for example. But I don&#x27;t think Svelte has an instance creation syntax that parallels its class definition syntax, to enable the &quot;instance substitution principal&quot; that supports instance first development: An instance of a class can be replaced by the definition of the instance, without changing the program semantics.<p><a href="https:&#x2F;&#x2F;svelte.dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;svelte.dev&#x2F;</a><p>Here&#x27;s some stuff I recently (and not so recently) posted about OpenLaszlo (with some broken links fixed):<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22025026" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22025026</a><p>Oliver Steele describes &quot;Instance First Development&quot;, which the language he designed, OpenLaszlo, supported through the &quot;Instance Substitution Principle&quot;. I&#x27;ve written about it here before, and here are some links and excerpts.<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=14418108" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=14418108</a><p>In the right context, prototypes can enable Instance-First Development, which is a very powerful technique that allows you to quickly and iteratively develop working code, while delaying and avoiding abstraction until it&#x27;s actually needed, when the abstraction requirements are better understood and informed from experience with working code.<p>That approach results in fewer unnecessary and more useful abstractions, because they follow the contours and requirements of the actual working code, instead of trying to predict and dictate and over-engineer it before it even works.<p>Instance-First Development works well for user interface programming, because so many buttons and widgets and control panels are one-off specialized objects, each with their own small snippets of special purpose code, methods, constraints, bindings and event handlers, so it&#x27;s not necessary to make separate (and myriad) trivial classes for each one.<p>Oliver Steele describes Instance-First Development as supported by OpenLaszlo here:<p>Instance-First Development<p><a href="http:&#x2F;&#x2F;blog.osteele.com&#x2F;2004&#x2F;03&#x2F;classes-and-prototypes&#x2F;" rel="nofollow">http:&#x2F;&#x2F;blog.osteele.com&#x2F;2004&#x2F;03&#x2F;classes-and-prototypes&#x2F;</a><p>[...]<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=21841054" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=21841054</a><p>[...] The mantle of constraint based programming (but not Instance First Development) has been recently taken up by &quot;Reactive Programming&quot; craze (which is great, but would be better with a more homoiconic language that supported Instance First Development and the Instance Substitution Principle, which are different but complementary features with a lot of synergy). The term &quot;Reactive Programming&quot; describes a popular old idea: what spreadsheets had been doing for decades. [...]<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=7756215" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=7756215</a><p>Oliver Steele (one of the architects of OpenLaszlo, and a great Lisp programmer) describes how OpenLaszlo supports &quot;instance first development&quot; and &quot;rethinking MVC&quot;:<p><a href="http:&#x2F;&#x2F;blog.osteele.com&#x2F;2004&#x2F;03&#x2F;classes-and-prototypes" rel="nofollow">http:&#x2F;&#x2F;blog.osteele.com&#x2F;2004&#x2F;03&#x2F;classes-and-prototypes</a><p><a href="http:&#x2F;&#x2F;blog.osteele.com&#x2F;2003&#x2F;08&#x2F;rethinking-mvc" rel="nofollow">http:&#x2F;&#x2F;blog.osteele.com&#x2F;2003&#x2F;08&#x2F;rethinking-mvc</a><p>[...] I&#x27;ve used OpenLaszlo a lot, and I will testify that the &quot;instance first&quot; technique that Oliver describes is great fun, works very well, and it&#x27;s perfect for the kind of exploratory &#x2F; productizing programming I like to do. (Like tacking against the wind, first exploring by creating instances, then refactoring into reusable building block classes, then exploring further with those...)<p>OpenLaszlo&#x27;s declarative syntax, prototype based object system, xml data binding and constraints support that directly and make it easy.<p>OpenLaszlo&#x27;s declarative syntax and compiler directly support instance first development (with a prototype based object system) and constraints (built on top of events and delegates -- the compiler parses the constraint expressions and automatically wires up dependences), in a way that is hard to express elegantly in less dynamic, reflective languages. (Of course it was straightforward for Garnet to do with Common Lisp macros!)<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=17360883" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=17360883</a><p>Instance-First Development:<p><a href="https:&#x2F;&#x2F;blog.osteele.com&#x2F;2004&#x2F;03&#x2F;classes-and-prototypes&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.osteele.com&#x2F;2004&#x2F;03&#x2F;classes-and-prototypes&#x2F;</a><p>&gt;The equivalence between the two programs above supports a development strategy I call instance-first development. In instance-first development, one implements functionality for a single instance, and then refactors the instance into a class that supports multiple instances.<p>&gt;[...] In defining the semantics of LZX class definitions, I found the following principle useful:<p>&gt;Instance substitution principal: An instance of a class can be replaced by the definition of the instance, without changing the program semantics.<p>In OpenLaszlo, you can create trees of nested instances with XML tags, and when you define a class, its name becomes an XML tag you can use to create instances of that class.<p>That lets you create your own domain specific declarative XML languages for creating and configuring objects (using constraint expressions and XML data binding, which makes it very powerful).<p>The syntax for creating a bunch of objects is parallel to the syntax of declaring a class that creates the same objects.<p>So you can start by just creating a bunch of stuff in &quot;instance space&quot;, then later on as you see the need, easily and incrementally convert only the parts of it you want to reuse and abstract into classes.<p>What is OpenLaszlo, and what&#x27;s it good for?<p><a href="https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20080211173607&#x2F;http:&#x2F;&#x2F;www.donhopkins.com&#x2F;drupal&#x2F;node&#x2F;124" rel="nofollow">https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20080211173607&#x2F;http:&#x2F;&#x2F;www.donhop...</a><p>Constraints and Prototypes in Garnet and Laszlo:<p><a href="https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20080211173607&#x2F;http:&#x2F;&#x2F;www.donhopkins.com&#x2F;drupal&#x2F;node&#x2F;69" rel="nofollow">https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20080211173607&#x2F;http:&#x2F;&#x2F;www.donhop...</a>