language-oriented programming (LOP)

Contributor(s): Cameron McKenzie

Language-oriented programming (LOP) is an approach to software development that focuses on the use of domain specific languages (DSLs) to solve problems within various domains in a system or application. It may include the use of both existing DSLs and the creation of new ones. Identifying and understanding user requirements is the key to successful LOP. Because it focuses on writing software that addresses problems described in concrete terms, it may particularly useful for behavior-driven development projects.

LOP permits developers to work outside the constraints of general purpose languages such as Java and C++ that would entail writing a great deal of complex code to achieve their desired outcome. LOP sidesteps the difficulties posed by trying to map a conceptual model onto the infrastructure of an existing language that may be limited to constructs such as classes, loops, etc. Instead, programmers focus on the simplest way to perform the task (i.e., solve the problem or meet user requirements). Then, they utilize or construct one or more DSLs that solve that problem in a highly performant way. There is generally minimal effort required to edit the code itself after creation because the language is constructed to fit the conceptual model of the problem/solution. This enables direct mapping of user requirements onto the language.

This was last updated in December 2014

Continue Reading About language-oriented programming (LOP)

Dig Deeper on Software design and development

Join the conversation


Send me notifications when other members comment.

Please create a username to comment.

I would have thought the the idea of an API was to build a domain specific library or framework using a general purpose language. APIs aren't just about building abstract frameworks to handle HTTP requests or database inteactions. They are created all the time to make it easier to meet business specific needs.
Hi Patrick, your comment confuses me a little bit. This definition of language oriented programming doesn't make mention of APIs or of HTTP requests. I'm guessing this comment is actually in regards to our definition of a RESTful API here:
Is that correct?
I suspect there's a lot of possibility with LOPs.  In some ways, BDD, Gherkin, in automated test driven development begin to look like LOPs.  I've seen a lot of push to focus less on having the cleanest, simplest code, but to having the most understandable in some circles.

By moving the code to be more readable to the person on the consuming end, the better they can take advantage of what is under the hood.  For example: I might have a desire to register an account and then immediately login.  Instead of calling Register and then Login, I might create a method that calls performs both methods in sequence, and handles any special case logic that might be needed when one comes immediately after the other.

A lot of the automated testing (checks) I've written begin to start looking more and more like abstractions of one another, especially when you consider the problems of end to end testing, where the favoring of building work flows over top of distinct operations begins to make a lot of sense.