To install click the Add extension button. That's it.

The source code for the WIKI 2 extension is being checked by specialists of the Mozilla Foundation, Google, and Apple. You could also do it yourself at any point in time.

4,5
Kelly Slayton
Congratulations on this excellent venture… what a great idea!
Alexander Grigorievskiy
I use WIKI 2 every day and almost forgot how the original Wikipedia looks like.
Live Statistics
English Articles
Improved in 24 Hours
Added in 24 Hours
Languages
Recent
Show all languages
What we do. Every page goes through several hundred of perfecting techniques; in live mode. Quite the same Wikipedia. Just better.
.
Leo
Newton
Brights
Milds

Domain-specific modeling

From Wikipedia, the free encyclopedia

Domain-specific modeling (DSM) is a software engineering methodology for designing and developing systems, such as computer software. It involves systematic use of a domain-specific language to represent the various facets of a system.

Domain-specific modeling languages tend to support higher-level abstractions than general-purpose modeling languages, so they require less effort and fewer low-level details to specify a given system.

YouTube Encyclopedic

  • 1/3
    Views:
    6 514
    28 498
    2 954
  • Introduction To Domain-Specific Modeling
  • Domain-Specific Languages with Martin Fowler
  • 20 Examples on Domain-Specific Modeling

Transcription

Welcome to the webcast introducing Domain-Specific Modeling. Engineering software is all about bridging the gap between the solution expressed in the problem domain terms show here in the red area to its implementation in the machine code running on the hardware shown in the blue area. Regardless of what kind of software you are developing finding a solution always starts by expressing that solution in terms of the problem domain. Once you have defined your solution you can then map it into the implementation... in your code. Over the years technologies have helped software engineer to raise the level abstraction closer to the problem domain by providing better programming languages, such as Fortran or C for instance. And then these languages have automation mechanisms that provide and translate the specifications in those languages too lower abstract machine code. This has made software development much more productive and less complex than before. Newer programming languages, such as Java or C# have changed his picture very little. To raise the level of abstraction further, to tackle the complexity and growing size of software modeling languages such as UML or SySML were introduced. UML for instance provides software engineers a way to make a visual plan of the code before writing that code. The problem with this approach is that it forces the developer to solve the same problem several times. First in the problem domain concepts, then in UML models and finally in code. UML, unfortunately, does not raise the abstraction level further, does not assist software engineer in making correct design because it's general purpose: Allows only very little code to be generated from it. As a result engineers trying to apply UML typically throw those models away once they start coding. With domain-specific modeling we can continue to raise the level of abstraction closer to the problem domain. We do this not by trying to visualize the code but by providing a highly tailored modeling languages that visualize the problem domain and therefore guide the modelers into making correct designs. Modelers design here application visually with the concepts that mimic closely real real objects and then also enable generating the lower level code from these designs. Let's look next a practical example. While each domain is different and have specific language I'll use here a domain we already know and are familiar with: Time. We have here a domain-specific languages for digital wristwatches. This company makes different kind of watcj products for different market segments but all applications somehow deal with time and provide different kind of features like timer, worldtime, stopwatch, laptime, and so forth. The actual watches that we implement here we can target different executing languages like C Java, lets say for Android or C# for Windows or Windows Phones. Let's inspect next these in a modeling tool. I apply here MetaEdit+. MetaEdit+ is a modeling tool and also a language development tool. What we have here is two different kind of languages. I have here a language for describing watch family. We have here five different kind of watches: Ace, Delecia, Sporty Celestron and Celestra. If I click here one of these models now I can see that this language says that the model called 'Ace' is a watch for an adventure person and each watch contains one display and one logical behavior. If you look these.. display definitions in more detail we can see that each display contains a set of icons, unit zones, like minutes, seconds, hours and a set of buttons. This language allows me to add new icons and buttons but restricts now the design space into this domain. So what this describes now is a structure off the display. Watch must also do something and there is behavior. What I have here is a description of the behavior side and some of these can be reused for multiple watches. So let's see the behavior. If I go and put a battery to my watch it goes to time, from time to alarm, alarm to stopwatch and I can also go and see what looks the individual watch applications like here the stopwatch. And we could now add here more features. But here the language is a bit different than the watch family language. Now the modeling concepts that I have here and are visible in the toolbar, like actions, alarms, buttons, displays, icons and so forth. So I now design my application using these high-level concepts. We could for example add here laptime feature so by pressing certain button when we are running the time we could freeze the display to show the current elapsed time. And then pressing maybe the button again we would go back to see the current stopwatch time. So let's add here a new state called laptime. Then I can connect my laptime state by saying that once our time is running then we can go to a laptime. Then, of course, I need to say somehow that what triggers the transition and now when I am using the domain concepts I could reuse some of these buttons and say that if I press the 'down' button then I can trigger this transition. This language also allows knows rules of this domain. If I want to do some silly things, like connect this button to this icon, it doesn't allow me to do that. It only allows me to do correct kind of designs like these. I can also have other kind of designs - if I for example add here functionality like actions which are not related to any of my designs I can run a number of checkers or annotate my models to see that there are some things that I need to correct before I continue. To finalize this application, let's add here an action and this language has the support for aritmetic so I can calculate also the time. I could say that let's calculate the laptime by taking 'systemtime' minus 'starttime' and put the result to 'stoptime'. So now we are done. As you saw, all the modeling concepts I'm using here are high-level language concepts. They are no programming concepts here. So let's next look if our laptime is working. I can choose here different generation targets ... into which we would like to generate the code and in this case we could generate the code into Java and also animate our models while we are using it. So here is all the generated code and now we have different kind of watch applications here visible. Let's go to this 'Ace' model and let's go there to the laptime feature. So now we are in this state called 'stopped'. If I press up button it triggers the transition put's the icon on calculates the time to be shown in this display and we are now in the 'running' state. But if I now press the 'down' button we are in the newly created laptime and we see the current laptime here. Nothing should happen with the other buttons unless we press 'down' button again. As you noticed none of the concepts in this language deal with implementation, low-level detailed coding concepts. The language raises our abstraction level and allowed us to build the applications very fast. So what is Domain-Specific Modeling? With this example you saw that domain- specific language aims to capture domain knowledge - not to visualize the code. Visualizing the code helps very little. The language itself uses domain abstractions and domain concepts as modeling constructs. So the engineers don't need to learn any new languages. They can use the concepts they already know in their domain. The language also narrows down the design space. It also means that the developers can design the products using domain terms so they can work with the already existing concepts, only solve the right kind of problems and only solve the problems once - in the model. No need to update models and code or make a changes into multiple files because the files are now generated. No round-tripping needed. Thank you for your time. If you want to play with this example language you can download it at metacase.com/download. For more examples on domain-specific please have a look at our DSM examples webcast as seeing an example to is closer to your problem domain will likely help you in assisting applicability of Domain-Specific Modeling in your organization. Thank you for watching!

Overview

Domain-specific modeling often also includes the idea of code generation: automating the creation of executable source code directly from the domain-specific language models. Being free from the manual creation and maintenance of source code means domain-specific language can significantly improve developer productivity.[1] The reliability of automatic generation compared to manual coding will also reduce the number of defects in the resulting programs thus improving quality.

Domain-specific language differs from earlier code generation attempts in the CASE tools of the 1980s or UML tools of the 1990s. In both of these, the code generators and modeling languages were built by tool vendors.[citation needed] While it is possible for a tool vendor to create a domain-specific language and generators, it is more normal for domain-specific language to occur within one organization. One or a few expert developers creates the modeling language and generators, and the rest of the developers use them.

Having the modeling language and generator built by the organization that will use them allows a tight fit with their exact domain and in response to changes in the domain.

Domain-specific languages can usually cover a range of abstraction levels for a particular domain. For example, a domain-specific modeling language for mobile phones could allow users to specify high-level abstractions for the user interface, as well as lower-level abstractions for storing data such as phone numbers or settings. Likewise, a domain-specific modeling language for financial services could permit users to specify high-level abstractions for clients, as well as lower-level abstractions for implementing stock and bond trading algorithms.

Topics

Defining domain-specific languages

To define a language, one needs a language to write the definition in. The language of a model is often called a metamodel, hence the language for defining a modeling language is a meta-metamodel. Meta-metamodels can be divided into two groups: those that are derived from or customizations of existing languages, and those that have been developed specifically as meta-metamodels.

Derived meta-metamodels include entity–relationship diagrams, formal languages, extended Backus–Naur form (EBNF), ontology languages, XML schema, and Meta-Object Facility (MOF). The strengths of these languages tend to be in the familiarity and standardization of the original language.

The ethos of domain-specific modeling favors the creation of a new language for a specific task, and so there are unsurprisingly new languages designed as meta-metamodels. The most widely used family of such languages is that of OPRR,[2][3] GOPRR,[4] and GOPPRR, which focus on supporting things found in modeling languages with the minimum effort.

Tool support for domain-specific languages

Many General-Purpose Modeling languages already have tool support available in the form of CASE tools. Domain-specific language languages tend to have too small a market size to support the construction of a bespoke CASE tool from scratch. Instead, most tool support for domain-specific language languages is built based on existing domain-specific language frameworks or through domain-specific language environments.

A domain-specific language environment may be thought of as a metamodeling tool, i.e., a modeling tool used to define a modeling tool or CASE tool. The resulting tool may either work within the domain-specific language environment, or less commonly be produced as a separate stand-alone program. In the more common case, the domain-specific language environment supports an additional layer of abstraction when compared to a traditional CASE tool.

Using a domain-specific language environment can significantly lower the cost of obtaining tool support for a domain-specific language, since a well-designed domain-specific language environment will automate the creation of program parts that are costly to build from scratch, such as domain-specific editors, browsers and components. The domain expert only needs to specify the domain specific constructs and rules, and the domain-specific language environment provides a modeling tool tailored for the target domain.

Most existing domain-specific language takes place with domain-specific language environments, either commercial such as MetaEdit+ or Actifsource, open source such as GEMS, or academic such as GME. The increasing popularity of domain-specific language has led to domain-specific language frameworks being added to existing IDEs, e.g. Eclipse Modeling Project (EMP) with EMF and GMF, or in Microsoft's DSL Tools for Software Factories.

Domain-specific language and UML

The Unified Modeling Language (UML) is a general-purpose modeling language for software-intensive systems that is designed to support mostly object oriented programming. Consequently, in contrast to domain-specific language languages, UML is used for a wide variety of purposes across a broad range of domains. The primitives offered by UML are those of object oriented programming, while domain-specific languages offer primitives whose semantics are familiar to all practitioners in that domain. For example, in the domain of automotive engineering, there will be software models to represent the properties of an anti-lock braking system, or a steering wheel, etc.

UML includes a profile mechanism that allows it to be constrained and customized for specific domains and platforms. UML profiles use stereotypes, stereotype attributes (known as tagged values before UML 2.0), and constraints to restrict and extend the scope of UML to a particular domain. Perhaps the best known example of customizing UML for a specific domain is SysML, a domain specific language for systems engineering.

UML is a popular choice for various model-driven development approaches whereby technical artifacts such as source code, documentation, tests, and more are generated algorithmically from a domain model. For instance, application profiles of the legal document standard Akoma Ntoso can be developed by representing legal concepts and ontologies in UML class objects.[5]

See also

References

  1. ^ Kelly, S. and Tolvanen, J.-P., (2008) Domain-Specific Modeling: Enabling Full Code Generation, John Wiley & Sons, New Jersey. ISBN 978-0-470-03666-2 [1]
  2. ^ R.J. Welke. The CASE Repository: More than another database application. In W.W. Cotterman and J.A. Senn, editors, Proceedings of 1988 INTEC Symposium Systems Analysis and Design: A Research Strategy, Atlanta, Georgia, 1988. Georgia State University. [2]
  3. ^ Smolander, K., (1992) OPRR - A Model for Modeling Systems Development Methods. In: Next Generation CASE Tools (eds. K. Lyytinen, V.-P. Tahvanainen) IOS Press, Amsterdam, Netherlands, pp. 224-239.[3]
  4. ^ Kelly, S., Lyytinen, K., and Rossi, M., "MetaEdit+: A Fully Configurable Multi-User and Multi-Tool CASE Environment," Proceedings of CAiSE'96, 8th Intl. Conference on Advanced Information Systems Engineering, Lecture Notes in Computer Science 1080, Springer-Verlag, pp. 1-21, 1996. (in Ph.D. thesis as 3metools.pdf)
  5. ^ Flatt, Amelie; Langner, Arne; Leps, Olof (2022). Model-Driven Development of Akoma Ntoso Application Profiles - A Conceptual Framework for Model-Based Generation of XML Subschemas (1st ed.). Heidelberg: Sprinter Nature. ISBN 978-3-031-14131-7.

External links

This page was last edited on 1 April 2023, at 17:52
Basis of this page is in Wikipedia. Text is available under the CC BY-SA 3.0 Unported License. Non-text media are available under their specified licenses. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. WIKI 2 is an independent company and has no affiliation with Wikimedia Foundation.