Linguistic Abstraction for the Web

June 08, 2011

Today I gave a TechTalk at Google Mountain View about “Linguistic Abstraction for the Web”.

Abstract Our programming languages have been developed for the single machine programming model, while our current computing environment is distributed and parallel. For example, web applications are programs that run on three different machines, client, server, and database. This results in boilerplate code for encoding communication between layers, and it leads to polyglot programming with limited cross language consistency checking, leading to late detection of failures.

Domain-specific languages (DSLs) address these problems by providing abstractions and notations that allow direct and understandable expression of domain concepts instead of encoding these in a lower level programming language. Since DSLs are typically used by a smaller audience, efficient design and implementation of DSLs is crucial to make introduction possible at all. To enable software engineers to effectively design, implement, and apply domain-specific languages, we have developed the Spoofax Language Workbench, an integrated development environment (IDE) for interactive definition for languages and their IDEs based on declarative language definitions. Spoofax supports editing of language definitions and use of editors generated from those definitions in the same environment.

With Spoofax we have developed WebDSL and Mobl. WebDSL is a DSL for development of web applications, which integrates sub-languages for data modeling, UI templates, access control, and data validation from which generate Java, SQL, and JavaScript code is generated to run on server, database, and browser. Mobl is a high-level declarative language for mobile web applications, which generates HTML5 applications that run in the browser. Both languages provide full compile-time cross-concern consistency checking.

In the presentation, I will show how the use of languages such as WebDSL and Mobl greatly simplifies software development, and how a language workbench such as Spoofax brings language design and development into reach of software developers.