Why I've Come to Prefer Fluent APIs Over Other Kinds of DSLs

Recorded at:

Summary
John Slaby discusses the reasons why he prefers fluent APIs and examine, through examples, the many different ways that Fluent APIs can be used to help produce better solutions than external DSLs.

Bio

John Slaby is an Engineering Fellow at Raytheon with over 25 years experience in software and systems engineering. At Raytheon, he has been a Software Architect on numerous programs and was the Principal Investigator for research projects on model-driven software development and domain-specific modeling languages. He is currently the engineering lead on an applied research project.

Code Generation conference is the leading event on the practical applications of Model-Driven Software Development (MDSD). It offers a high quality learning experience through discussions, debates, a diverse range of practical tutorials and workshops. Now in its 7th year, it is known for providing a high-value learning experience and attracts industry-recognised experts to share their experiences.

Fluent interfaces is a "DSL" for programmers to the extent that programming is a domain. I fail to understand the thesis of this presentation. A DSL is for domain experts. If you throw a DSL at a person who is not a domain expert, the reaction is expected to be what the speaker says: "What the heck is this thing?" That leaves only two possibilities: First, the DSL wan't good enough and did not capture the "domain" well enough. It was probably so bad that a "domain expert" did not see his domain ideas expressed in the language at all. Alternatively, the new team of people were really programmers and not domain experts. So they did not get squat out of the DSL. If a team can replace a well-designed DSL with just a fluent API, they would as well put lamonade in their cars instead of gas.

However, I like the speaker's comment: "... have become pragamtic enough to take small victories..."