![]() ![]() I really hope you have heard of this quite successful language to define documents. Maybe Joe will never reach the level of a DBA, but he can learn a few basic queries and adapt them to his needs, making him more independent and letting his colleagues focus on their job instead of helping him out. Suppose he needs to know the maximum temperature in august in Atlanta: SELECT MAX(value) FROM TEMPERATURES WHERE city="Atlanta" AND month="August" ![]() Maybe Joe should not be trusted with writing access to the database, but he could get read access and write simple queries to answer his own questions instead of having to ask someone and wait to get an answer. However you do not need to be trained as a developer to learn SQL. Let’s get some stats from the STATS table: SELECT MAX(TEMP_F), MIN(TEMP_F), AVG(RAIN_I), IDįor sure you do not expect the average Joe to be able to write complex queries: SQL is not a trivial language and it requires some time to be mastered. It is a language used to define how to insert, modify or extract data from a relational database. ![]() With a minimal training now anyone can describe a sispecific interaction with a website and the expected results. In this case there is no need for a developer to define the translation of commands to a GPL because this language users domain specific commands, like “Click”, which the interpreter knows how to execute. Here we define how to navigate on a certain website and what we expect to find. Website-spec can be used to define functional tests specific for web applications. Gherkin is not the only DSL used to define tests. Website-spec – A DSL for functional web testing It is much better to sit at a table and discuss with a bank representative using the example we have displayed than showing him the hundreds of lines of Java which correspond to those commands, right? 6. In other words, this DSL is great for hiding the real code behind a surface that everyone can understand and everyone can contribute to. It is also possible to start in the other way: first you write your scenarios, as you want, trying to capture the requirements and only later developers map each command to a corresponding function in a GPL. Once the developers have created these commands, specific to the application of interest, all users can use them while defining their functional tests. digraph graphname $ on his account” and define the code that execute this command in the GPL chosen for the project (Ruby, Java, or others are supported). DOT – A DSL to define graphsĭOT is a language that can describe graphs, either directed or non directed. I can instead list several examples of public DSLs which are used by millions of persons. I have built several of this kind of DSLs myself, but I am not allowed to share them. ![]() Some DSLs are intended to be used by programmers, and therefore are more technical, while others are intended to be used by someone who is not a programmer and therefore they use less geeky concepts and syntax.ĭomain Specific Languages can be extremely specific and being created only to be used within a company. They can be used in different contexts and by different kinds of users. 19 Examples of Domain Specific Languagesĭomain Specific Languages can serve all sort of purposes. Ok, but what does it mean in practice? How do DSLs look like? Let’s see plenty of examples. Languages are tools to solve problems and Domain Specific Languages are specific tools, good to solve a limited set of problems. You can open a beer with an hammer, it is just way more difficult, risky and lead to poorer results that using a specific tool like a bottle opener. They are like hammers: good enough for many tasks, if you have the patience and ability to adapt them, but in most cases you would be better off using a more specific tool. They are tools good enough to create all sort of programs, but not really specific to anything. You could be familiar with the typical programming languages (a.k.a. Powered by ConvertKit What are Domain Specific Languages?ĭomain Specific Languages are languages created to support a particular set of tasks, as they are performed in a specific domain. I'd like to learn more about language design and DSLs If you fill this in, you will be marked as a spammer. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |