Alphabet Soup
Posted by anthony crumley, Sun Apr 01 22:19:00 UTC 2007
The yet to be named (YTBN) JavaScript framework will be based on a DHTML MVC DSL. No, this is not the latest high speed internet. It is a domain specific language (DSL) for creating rich internet applications (RIA).
The basic idea of a domain specific language (DSL) is a computer language that’s targeted to a particular kind of problem, rather than a general purpose language that’s aimed at any kind of software problem.
One community that uses DSLs a lot is the Unix community where they are often referred to as little languages or mini languages. ... The most common unix-style approach is to define a language syntax and then either use code generation to a general purpose language, or write an interpreter for the DSL. Unix has many tools that make this easier. I use the term External DSL to refer to this kind of DSL.
The lisp and smalltalk communities also have a strong tradition of DSLs, but they tend to do it another way. Rather than define a new language, they morph the general purpose language into the DSL. [emphasis added] ... This Internal DSL (also referred to as an embedded DSL) uses the constructs of the programming language itself to define the DSL.
YTBN is of the internal flavor. Global functions “morph” the JavaScript language into a powerful RIA language. The downside is that you have to give up a number of global names. This isn’t too bad because you shouldn’t be using global names anyway. Yeah, I know, do as I say yada, yada, yada… The upside is that you can write web apps with a powerful language designed just for that purpose.
The current YTBN vocabulary is as follows…
- DHTML – a, br, button, dd, div, dl, dt, em, h1, h2, h3, h4, img, input, label, li, meta, object, ol, option, p, script, select, span, table, td, textarea, th, tr, ul
- MVC – model, view, controller
- Other richness – component, effect, layout, partial, resource, validator
Coming soon, all the juicy details of the DHTML functions.