"One could argue that Internal DSLs are not really a separate technique from #2 (Tree Building) and #3 (Templates)"<p>JSX doesn't strike me as that much different from JSP. It's still mixing markup and code together.<p>There's another #4. That was Apple's WebObjects. WebObjects was unique in that it provided bindings between the two languages. In one file, you have HTML, in another, you have Java. Then in a third, the .WOD file, you had bindings between the two.<p>The HTML was really XHTML with one extra tag, the webobject tag, and it had one name attribute. Nothing new to learn there.<p><webobject name="NameFromHTML"/><p>The java file was just a java object that implemented the WOComponent class.<p>public class WOComponentClassName extends WOComponent {...}<p>The WOD bound the two together like<p>NameFromHTML : WOComponentClassName { key1 = value1; }<p>If you needed to reuse a chunk, you could just reference it twice with another <webobject name="NameFromHTML"/>.<p>Then at runtime, the webobjects application read in the html templates, and associated the key with a WOComponent getter/setter or field, and the value was either hard coded, or came from the java component as well.<p>HTML templates quickly boiled down to a handful of <webobject> tags. You could express entire, complex pages with just a few tags.<p>Later on, developers with bad habits tried to add in things they were familiar with from other lesser solutions. WebObjects slowly degenerated into something that looked more like JSP with bindings being set inline in the html, executable binding values with OGNL, the whole works. It turned something beautiful and still more advanced than any template language in use today, into your standard template language garbage pile.<p>It's fortunate that server side rendering went out of fashion, Apple promptly dropped support, and WebObjects was allowed to die a somewhat dignified death in obscurity.