Scripting Modeling Languages

Scripting Modeling Languages

Scripting Modeling Languages Michaël Hoste Tom Mens Service de Génie Logiciel Service de Génie Logiciel Université de Mons - UMONS Université de Mons - UMONS Place du Parc 20, 7000 Mons, Belgique Place du Parc 20, 7000 Mons, Belgique [email protected] [email protected] ABSTRACT Programming Interface) created in the main language and Domain-Independent Models are mainly used for documen- accessible by the scripting language (cf. figure 1). tation purposes and are most of the time too complex to be Knowing that dynamic languages, and more particularly directly executed, even by code generation. Domain-Specific scripting languages, seem perfect for beginners, the purpose Models can sometimes be executed, but their scope is too of this article is to raise the level of abstraction for even specific to be reused for other purposes. We propose to more unexperienced developers. The idea is to create script- develop a mechanism that allows the creation of modeling ing modeling languages that are easier to learn and easier to languages that will be directly executed into software ap- modify, yet with the same flexibility as dynamic languages plications. We inspire ourselves from dynamic languages, [5]. Scripting modeling languages are intended to be mapped especially scripting languages, and adapt their approach to to scripting languages in real-time. This could open new per- models in order to be able to execute models directly, not spectives and indirectly spread the use of dynamic languages for an entire application, but for a specific and well-defined to a sphere of less-experienced developers. Furthermore, part of it. The goal of scripting languages is to raise the for some domain-specific applications, we demonstrate that level of abstraction of the host language and to delegate the application's evolution can be managed only by model some work to an external language. With the help of two scripting, without any change to the main language. concrete examples, we claim that scripting modeling lan- Nowadays software engineers use more and more models guages can meet this objective better than textual scripting as primary artifacts in the development of software systems. languages and that an application can evolve only by using This software development methodology, known as model- script models. driven software engineering (MDE) [12], addresses the in- trinsic complexity of software-intensive systems by raising the level of abstraction, and by hiding the accidental com- Keywords plexity of the underlying technology as much as possible [2]. visual scripting, model-driven software development, script- Our approach could be interesting in the scope of MDE. ing language, modeling language, software evolution UML is one of the most popular domain-independent soft- ware modeling languages [4]. UML 2.x provides 13 diagram types that correspond to as many different views on the soft- 1. INTRODUCTION ware being modeled. As these views overlap on many points, One of the main advantages of using dynamic languages it is very difficult to prevent the occurrence of inconsisten- is that they offer a higher degree of freedom than static cies between the views and to maintain consistency between languages. The developer does not need to declare variables, the different views during evolution [13, 15]. Because of that, to allocate memory, or even to compile. The data types only a few views are usually created to design an application are also easier to manipulate. These features make dynamic and UML is mostly used for documentation purposes. languages good candidates for a junior developer to program The goal of our paper is to include models in applications [9]. in a more integrated way. We aim to integrate executable Dynamic languages are also very appreciated as scripting models as small parts of the software, as opposed to execut- languages. A scripting language is a mechanism that allows ing a model representing the entire software. In the tradi- to control part of an application developed in another lan- tional approach, a model represents the global application guage. More and more applications use external scripting architecture and design at a high level, and the programmer languages to extend their features (e.g., Adobe Photoshop, needs to refine the model with a textual programming lan- Blender, MySQL, VLC Media Player, Gimp, World of War- guage. In our approach, the model does not represent the craft and most recent games). Scripting languages can be whole design of the application but only the behavior of one helpful for internal development but, most of the time, their of its subsets. The main idea is to delegate specific tasks to use is dedicated to external unexperienced developers want- an external model the way we do with scripting languages. ing to make small customizations to their software. After These days, more and more software applications use ex- reading a few tutorials, users with a low level of program- ternal scripting languages to extend their features. Section 2 ming skills can create a new filter for Gimp [10], a new screen briefly summarizes the concept and the advantages of using helper for World of Warcraft, or even a new campaign for these scripting languages. Section 3 describes our vision of a a game if the game's architecture allows it [6]. All low- scripting modeling language and its technical aspects. Sec- level pieces of code are hidden behind an API (Application tion 4 highlights, with the help of two examples, the main advantages of using a model that controls the flow of an application. 2. SCRIPTING LANGUAGES Scripting languages are often embedded in applications to extend their features. They are usually adapted for large applications where there is a need for modularity and where it could be beneficial to delegate some tasks to an external process. Scripting languages have many advantages: (1) the scope of a script is limited to a subset of attributes, methods and classes through the use of a well-defined API; (2) a script can be modified and executed without any recompilation of Figure 1: The technical solution we use to execute the main program; (3) scripting languages provide, most of scripting modeling languages the time, a better productivity [9]; (4) scripting languages usually have the same capabilities as independent languages. These advantages allow senior programmers to delegate is to create a software design model that could define every some of the tasks to junior programmers that do not need aspect of a software application. to know the entire application architecture and code in or- We propose to merge the advantages of both modeling and der to be productive. Due to the limited scope of the script, scripting languages. We have seen that scripting languages there is a lower risk of side-effects and the propagation of er- improve the software modularity. We claim that it is useful rors is restricted to the script. As such, unexperienced users and possible to keep the modularity properties of scripting or programmers have the possibility to modify the applica- languages and raise the level of abstraction to the level of tion simultaneously with limited risk of breaking it. Fur- scripting modeling languages. Instead of including a textual thermore, there is no need to install a complete tool-chain scripting programming language in an application, we want in order to compile the application. One can make some to use a visual scripting modeling language with the same changes in the script and see the impact on the application role. behavior in real-time. The scripts will be more understandable, the develop- Scripting languages are an easy way to involve the cus- ment will be faster, and, consequently, its cost will be re- tomer in the software development process. This allows duced. More importantly, part of the development can be better feedback and faster adaptation to changing require- outsourced to third-parties, non-professional programmers ments. Smaller product life-cycles enable a more effective or even end-users, and all of these script models can be implementation that respond better to the user's require- shared by the community. This kind of business model is ments [1]. a win-win situation for both the software provider and its There are many success stories involving scripting lan- clients. guages in both open-source and commercial communities. For MDE, most of the time the software architect creates One out of many open-source examples is Blender, a power- models and then the programmer implements them. That ful 3D modeling and animation application written in C/C++. involves more work. Some solutions exist to automatically Blender uses Python as scripting language to embed some generate code from models or even to run models, but they behavior and provides an API with the available methods. still seem difficult to implement and still lack the proper By using Python scripting, the end-user can call Blender tools [11]. In our solution, the model is considered as a routines and extend the features in a wide range of ways primary artifact of the software and is directly executed. without any need to recompile. There are now hundreds of scripts written for Blender that can be used by the commu- Technical solution nity1. We want to have the possibility to use and combine different Some well-known commercial proprietary software is also scripting modeling languages. They will be transformed on- using scripts. It is an easy way to allow end-users to extend the-fly to a textual scripting language (like Lua). There will the software with new features even when it is closed-source. be domain-independent modeling languages, like flowcharts, With an active software community, it enhances the value of and domain-specific modeling languages.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    5 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us