SlideShare une entreprise Scribd logo
1  sur  57
Télécharger pour lire hors ligne
Developing Interacting Domain Specific Languages




        Developing Interacting Domain Specific Languages
                                                  Master’s thesis


                                                   Sander Mak

                            Center for Software Technology, Universiteit Utrecht


                                              October 25, 2007




                                                                   Supervisor        :   Doaitse Swierstra
                                                                   Daily supervision :   Bastiaan Heeren
                                                                                         Eelco Visser

                                  Center for Software Technology                                       Sander Mak
Developing Interacting Domain Specific Languages > Introduction


 Outline


        Introduction
    1


        DomainModel
    2


        WebLayer
    3


        Interaction
    4


        Reflection
    5


        Conclusion
    6




                                 Center for Software Technology   Sander Mak
Developing Interacting Domain Specific Languages > Introduction


 Domain Specific Language




                                                                  Increased productivity
                                                                  Increased quality
                                  Advantages:
                                                                  Clarity by abstraction

                                 Center for Software Technology                            Sander Mak
Developing Interacting Domain Specific Languages > Introduction


 Languages?

 Why the plural, i.e. DSLs




                                 Center for Software Technology   Sander Mak
Developing Interacting Domain Specific Languages > Introduction


 Languages?

 Why the plural, i.e. DSLs
         One-size fits all, monolithic
         approaches generally not
         succesful (like 4GLs)
         Separation of concerns, and:
         reusability of DSL in other
         contexts
 Premise: Technical domains are a
 good unit of composition




                                 Center for Software Technology   Sander Mak
Developing Interacting Domain Specific Languages > Introduction


 Languages?

 Why the plural, i.e. DSLs
         One-size fits all, monolithic
         approaches generally not
         succesful (like 4GLs)
         Separation of concerns, and:
         reusability of DSL in other
         contexts
 Premise: Technical domains are a
 good unit of composition




                                 Center for Software Technology   Sander Mak
Developing Interacting Domain Specific Languages > Introduction


 Languages?

 Why the plural, i.e. DSLs
           One-size fits all, monolithic
           approaches generally not
           succesful (like 4GLs)
           Separation of concerns, and:
           reusability of DSL in other
           contexts
 Premise: Technical domains are a
 good unit of composition
    Research questions:
            Are multiple interacting DSLs feasible?
       1


            How should interaction be concretized and implemented?
       2



                                 Center for Software Technology      Sander Mak
Developing Interacting Domain Specific Languages > Introduction


 The case study
      DomainModel               Modeling domain data, generating
                                JPA (similar to Hibernate) implementation
      WebLayer                  Modeling the view side of web-applications,
                                generating Seam/JSF/Facelets
      BusinessRules             Modeling functionality specific to a domain




    Different compilers, one goal: build a complete Java based web-app
                                 Center for Software Technology               Sander Mak
Developing Interacting Domain Specific Languages > Introduction


 Goals

    Why create DSLs for these domains:
       Increase productivity
                   Abstract away from implementation details, focus on domain
                   concepts (also gives more clarity)
                   Java frameworks are (inherently?) verbose
           Increase quality
                   Dynamic, interpreted mechanisms subvert static safety of Java code
                   Report domain specific errors




                                 Center for Software Technology                  Sander Mak
Developing Interacting Domain Specific Languages > Introduction


 Goals

    Why create DSLs for these domains:
       Increase productivity
                   Abstract away from implementation details, focus on domain
                   concepts (also gives more clarity)
                   Java frameworks are (inherently?) verbose
           Increase quality
                   Dynamic, interpreted mechanisms subvert static safety of Java code
                   Report domain specific errors


    What is explicitly not our goal:

           creation of production quality languages,
           unleashing every bit of power of target frameworks


                                 Center for Software Technology                  Sander Mak
Developing Interacting Domain Specific Languages > Introduction


 Goals

    Why create DSLs for these domains:
      Intended use
        Increase productivity
      To create data-intensive web-applications, focus on confines of
                                                        within domain
             Abstract away from implementation details,
      company guidelines. gives more clarity)
             concepts (also
                   Java frameworks are (inherently?) verbose
           Increase quality
                   Dynamic, interpreted mechanisms subvert static safety of Java code
                           ‘You can’t be everything to everyone,
                   Report domain specific errors
                                     so be something for someone’

    What is explicitly not our goal:

           creation of production quality languages,
           unleashing every bit of power of target frameworks


                                 Center for Software Technology                  Sander Mak
Developing Interacting Domain Specific Languages > DomainModel


 DomainModel language


   Language for defining persistent domain (or data) models

   Essential features:


           Concise definition of concepts (entities)
           Generates JPA implementation (standardized library)
           Encodes domain specific technical knowledge (e.g. object identity)
           Allows for domain specific semantic checking
           May be used in combination with different DSLs




                                Center for Software Technology          Sander Mak
Developing Interacting Domain Specific Languages > DomainModel


 Concept definition

   concept BlogEntry {
     title     :: String (name, required)
     abstract :: String
     contents :: String (required)
     user      -> User
     date      :: Date    (name)
     tags      -> [Tag]
     replies   <> [Reply]
     category :: {quot;Technicalquot; : TECH, quot;Otherquot; : NONTECH}
     trackback :: URL
   }




                                Center for Software Technology   Sander Mak
Developing Interacting Domain Specific Languages > DomainModel


 Concept definition

   concept BlogEntry {
     title     :: String (name, required)
     abstract :: String
     contents :: String (required)
     user      -> User
     date      :: Date    (name)
     tags      -> [Tag]
     replies   <> [Reply]
     category :: {quot;Technicalquot; : TECH, quot;Otherquot; : NONTECH}
     trackback :: URL
   }


   Types: Value, Extended (validated), Concept, List, Enumeration

                                Center for Software Technology      Sander Mak
Developing Interacting Domain Specific Languages > DomainModel


 Concept definition

   concept BlogEntry {
     title     :: String (name, required)
     abstract :: String
     contents :: String (required)
     user      -> User
     date      :: Date    (name)
     tags      -> [Tag]
     replies   <> [Reply]
     category :: {quot;Technicalquot; : TECH, quot;Otherquot; : NONTECH}
     trackback :: URL
   }


   Types: Value, Extended (validated), Concept, List, Enumeration

                                Center for Software Technology      Sander Mak
Developing Interacting Domain Specific Languages > DomainModel


 Concept definition

   concept BlogEntry {
     title     :: String (name, required)
     abstract :: String
     contents :: String (required)
     user      -> User
     date      :: Date    (name)
     tags      -> [Tag]
     replies   <> [Reply]
     category :: {quot;Technicalquot; : TECH, quot;Otherquot; : NONTECH}
     trackback :: URL
   }


   Types: Value, Extended (validated), Concept, List, Enumeration

                                Center for Software Technology      Sander Mak
Developing Interacting Domain Specific Languages > DomainModel


 Concept definition

   concept BlogEntry {
     title     :: String (name, required)
     abstract :: String
     contents :: String (required)
     user      -> User
     date      :: Date    (name)
     tags      -> [Tag]
     replies   <> [Reply]
     category :: {quot;Technicalquot; : TECH, quot;Otherquot; : NONTECH}
     trackback :: URL
   }


   Types: Value, Extended (validated), Concept, List, Enumeration

                                Center for Software Technology      Sander Mak
Developing Interacting Domain Specific Languages > DomainModel


 Concept definition

   concept BlogEntry {
     title     :: String (name, required)
     abstract :: String
     contents :: String (required)
     user      -> User
     date      :: Date    (name)
     tags      -> [Tag]
     replies   <> [Reply]
     category :: {quot;Technicalquot; : TECH, quot;Otherquot; : NONTECH}
     trackback :: URL
   }


   Types: Value, Extended (validated), Concept, List, Enumeration

                                Center for Software Technology      Sander Mak
Developing Interacting Domain Specific Languages > DomainModel


 Concept definition

   concept BlogEntry {
     title     :: String (name, required)
     abstract :: String
     contents :: String (required)
     user      -> User
     date      :: Date    (name)
     tags      -> [Tag]
     replies   <> [Reply]
     category :: {quot;Technicalquot; : TECH, quot;Otherquot; : NONTECH}
     trackback :: URL
   }


   Associations: Value, Reference, Composite

                                Center for Software Technology   Sander Mak
Developing Interacting Domain Specific Languages > DomainModel


 Concept definition

   concept BlogEntry {
     title     :: String (name, required)
     abstract :: String
     contents :: String (required)
     user      -> User
     date      :: Date    (name)
     tags      -> [Tag]
     replies   <> [Reply]
     category :: {quot;Technicalquot; : TECH, quot;Otherquot; : NONTECH}
     trackback :: URL
   }


   Associations: Value, Reference, Composite

                                Center for Software Technology   Sander Mak
Developing Interacting Domain Specific Languages > DomainModel


 Concept definition

   concept BlogEntry {
     title     :: String (name, required)
     abstract :: String
     contents :: String (required)
     user      -> User
     date      :: Date    (name)
     tags      -> [Tag]
     replies   <> [Reply]
     category :: {quot;Technicalquot; : TECH, quot;Otherquot; : NONTECH}
     trackback :: URL
   }


   Associations: Value, Reference, Composite

                                Center for Software Technology   Sander Mak
Developing Interacting Domain Specific Languages > DomainModel


 Concept definition

   concept BlogEntry {
     title     :: String (name, required)
     abstract :: String
     contents :: String (required)
     user      -> User
     date      :: Date    (name)
     tags      -> [Tag]
     replies   <> [Reply]
     category :: {quot;Technicalquot; : TECH, quot;Otherquot; : NONTECH}
     trackback :: URL
   }


   DomainModel annotations

                                Center for Software Technology   Sander Mak
Developing Interacting Domain Specific Languages > DomainModel


 Concept definition

   concept BlogEntry {
     title     :: String (name, required)
     abstract :: String
     contents :: String (required)
     user      -> User
     date      :: Date    (name)
     tags      -> [Tag]
     replies   <> [Reply]
     category :: {quot;Technicalquot; : TECH, quot;Otherquot; : NONTECH}
     trackback :: URL
   }


   DomainModel annotations

                                Center for Software Technology   Sander Mak
Developing Interacting Domain Specific Languages > DomainModel


 Concept definition

   concept BlogEntry {
     title        :: String (name, required)
     abstract :: String
       Compiling a DomainModel concept
     contents :: String (required)
       Definition -> User
                   BlogEntry results in BlogEntry.java, a
     user
       persistable:: Date
                   JPA entity: (name)
     date
     tags         -> [Tag]
     replies      <> [Reply]
                              268 LoC
     category :: {quot;Technicalquot; : TECH, quot;Otherquot; : NONTECH}
     trackback :: URL
   }


   DomainModel annotations

                                Center for Software Technology   Sander Mak
Developing Interacting Domain Specific Languages > DomainModel


 Concept definition

   concept BlogEntry {
     Q: Isn’t DomainModel almost the same as UML Class diagrams?
     title        :: String (name, required)
     A: Yes!
     abstract :: String
     contents :: String (required)
     userWe even ’borrowed’ some of the association symbols
                  -> User
     date      ’− :: Date
                >’ for references (name)
               ’<>’ for composites
     tags         -> [Tag]
     replies way, prior UML knowledge helps when using
                  <> [Reply]
          That
     category :: {quot;Technicalquot; : TECH, quot;Otherquot; : NONTECH}
          DomainModel
     trackback :: URL UML class diagram could serve as input for
          Theoretically, a
   }      the DomainModel compiler (if only we had a UML
              front-end)

   DomainModel annotations

                                Center for Software Technology     Sander Mak
Developing Interacting Domain Specific Languages > WebLayer


 WebLayer language


   Language for defining pages (views) in web-app

   Essential features:


           Works seamlessly with DomainModel definitions
           Abstracts away from the Seam framework and Java intricacies
           Strongly typed
           Explicit, checked data-flow between pages
           Generic constructs




                                Center for Software Technology           Sander Mak
Developing Interacting Domain Specific Languages > WebLayer


 WebLayer compiler




                                Center for Software Technology   Sander Mak
Developing Interacting Domain Specific Languages > WebLayer


 Page definition

   page ViewBlog(BlogEntry be, User u){
     var Reply r

       header(be.title + quot; (written on quot; + be.date + quot;)quot;)
       text(be.contents)
       table Tag t in be.tags { quot;Assigned tagsquot; -> t.tagName }

       quot;Reply to this post:quot;
       form( input(r)
             action( quot;Add replyquot;
                   , r.user = u; be.replies.add(r); be.save())
           )

       text(quot;Replies for post quot; + be.title + quot; :quot;)
       for Reply r in be.replies { show(r) }
       navigate(quot;Homequot;, Blog(u))
   }
                                Center for Software Technology   Sander Mak
Developing Interacting Domain Specific Languages > WebLayer


 Page definition

   page ViewBlog(BlogEntry be, User u){
     var Reply r

       header(be.title + quot; (written on quot; + be.date + quot;)quot;)
       text(be.contents)
       table Tag t in be.tags { quot;Assigned tagsquot; -> t.tagName }

       quot;Reply to this post:quot;
       form( input(r)
             action( quot;Add replyquot;
                   , r.user = u; be.replies.add(r); be.save())
           )

       text(quot;Replies for post quot; + be.title + quot; :quot;)
       for Reply r in be.replies { show(r) }
       navigate(quot;Homequot;, Blog(u))
   }
                                Center for Software Technology   Sander Mak
Developing Interacting Domain Specific Languages > WebLayer


 Page definition

   page ViewBlog(BlogEntry be, User u){
    Multiple page definitions in one file, starting with a header:
     var Reply r
     weblayer blog
      header(be.title + quot; (written on quot; + be.date + quot;)quot;)
      text(be.contents)
     using domainmodel blog{ quot;Assigned tagsquot; -> t.tagName }
      table Tag t in be.tags

       quot;Reply to this post:quot;
       form( input(r)
             action( quot;Add replyquot;
                   , r.user = u; be.replies.add(r); be.save())
           )

       text(quot;Replies for post quot; + be.title + quot; :quot;)
       for Reply r in be.replies { show(r) }
       navigate(quot;Homequot;, Blog(u))
   }
                                Center for Software Technology     Sander Mak
Developing Interacting Domain Specific Languages > WebLayer


 Page definition

   page ViewBlog(BlogEntry be, User u){
     var Reply r

       header(be.title + quot; (written on quot; + be.date + quot;)quot;)
       text(be.contents)
       table Tag t in be.tags { quot;Assigned tagsquot; -> t.tagName }

       quot;Reply to this post:quot;
       form( input(r)
             action( quot;Add replyquot;
                   , r.user = u; be.replies.add(r); be.save())
           )

       text(quot;Replies for post quot; + be.title + quot; :quot;)
       for Reply r in be.replies { show(r) }
       navigate(quot;Homequot;, Blog(u))
   }
                                Center for Software Technology   Sander Mak
Developing Interacting Domain Specific Languages > WebLayer


 Page definition

   page ViewBlog(BlogEntry be, User u){
     var Reply r

       header(be.title + quot; (written on quot; + be.date + quot;)quot;)
       text(be.contents)
       table Tag t in be.tags { quot;Assigned tagsquot; -> t.tagName }

       quot;Reply to this post:quot;
       form( input(r)
             action( quot;Add replyquot;
                   , r.user = u; be.replies.add(r); be.save())
           )

       text(quot;Replies for post quot; + be.title + quot; :quot;)
       for Reply r in be.replies { show(r) }
       navigate(quot;Homequot;, Blog(u))
   }
                                Center for Software Technology   Sander Mak
Developing Interacting Domain Specific Languages > WebLayer


 Page definition

   page ViewBlog(BlogEntry be, User u){
     var Reply r

       header(be.title + quot; (written on quot; + be.date + quot;)quot;)
       text(be.contents)
       table Tag t in be.tags { quot;Assigned tagsquot; -> t.tagName }

       quot;Reply to this post:quot;
       form( input(r)
             action( quot;Add replyquot;
                   , r.user = u; be.replies.add(r); be.save())
           )

       text(quot;Replies for post quot; + be.title + quot; :quot;)
       for Reply r in be.replies { show(r) }
       navigate(quot;Homequot;, Blog(u))
   }
                                Center for Software Technology   Sander Mak
Developing Interacting Domain Specific Languages > WebLayer


 Page definition

   page ViewBlog(BlogEntry be, User u){
     var Reply r

       header(be.title + quot; (written on quot; + be.date + quot;)quot;)
       text(be.contents)
       table Tag t in be.tags { quot;Assigned tagsquot; -> t.tagName }

       quot;Reply to this post:quot;
       form( input(r)
             action( quot;Add replyquot;
                   , r.user = u; be.replies.add(r); be.save())
           )

       text(quot;Replies for post quot; + be.title + quot; :quot;)
       for Reply r in be.replies { show(r) }
       navigate(quot;Homequot;, Blog(u))
   }
                                Center for Software Technology   Sander Mak
Developing Interacting Domain Specific Languages > WebLayer


 Page definition

   page ViewBlog(BlogEntry be, User u){
     var Reply r

       header(be.title + quot; (written on quot; + be.date + quot;)quot;)
       text(be.contents)
       table Tag t in be.tags { quot;Assigned tagsquot; -> t.tagName }

       quot;Reply to this post:quot;
       form( input(r)
             action( quot;Add replyquot;
                   , r.user = u; be.replies.add(r); be.save())
           )

       text(quot;Replies for post quot; + be.title + quot; :quot;)
       for Reply r in be.replies { show(r) }
       navigate(quot;Homequot;, Blog(u))
   }
                                Center for Software Technology   Sander Mak
Developing Interacting Domain Specific Languages > WebLayer


 Page definition

   page ViewBlog(BlogEntry be, User u){
     var Reply r

       header(be.title + quot; (written on quot; + be.date + quot;)quot;)
       text(be.contents)
       table Tag t in be.tags { quot;Assigned tagsquot; -> t.tagName }

       quot;Reply to this post:quot;
       form( input(r)
             action( quot;Add replyquot;
                   , r.user = u; be.replies.add(r); be.save())
           )

       text(quot;Replies for post quot; + be.title + quot; :quot;)
       for Reply r in be.replies { show(r) }
       navigate(quot;Homequot;, Blog(u))
   }
                                Center for Software Technology   Sander Mak
Developing Interacting Domain Specific Languages > WebLayer


 Page definition

   page ViewBlog(BlogEntry be, User u){
     var Reply r

       header(be.title + quot; (written on quot; + be.date + quot;)quot;)
       text(be.contents)
           Ideas for extension
       table Tag t in be.tags { quot;Assigned tagsquot; -> t.tagName }
                     Query language
       quot;Reply to this page abstraction
               Partial post:quot;
       form( input(r)
               Parameterized, reusable actions
             action( quot;Add replyquot;
               ... , r.user = u; be.replies.add(r); be.save())
           )

       text(quot;Replies for post quot; + be.title + quot; :quot;)
       for Reply r in be.replies { show(r) }
       navigate(quot;Homequot;, Blog(u))
   }
                                Center for Software Technology   Sander Mak
Developing Interacting Domain Specific Languages > WebLayer


 Issues


           Layout is more or less fixed
                  Example: every page element is placed beneath each other
                  We don’t want to replicate all of HTML inside WebLayer
                  Partial solution: embed generated page in freely editable template
                  For the rest: make assumptions, although compiler becomes more
                  specific
           Editing lists
                  Our solution is specific and ad-hoc
           Action language
                  Why not, for example, embed Java?




                                Center for Software Technology                   Sander Mak
Developing Interacting Domain Specific Languages > Interaction


 DSL Interaction

    We can use DomainModel constructs within WebLayer, but how does
    this interaction work?

    Goals
        Interaction must be intuitive to DSL user
        Languages must be as separate as possible
                   For the sake of reusability
           Generated code must statically link




                                 Center for Software Technology   Sander Mak
Developing Interacting Domain Specific Languages > Interaction


 DSL Interaction

    We can use DomainModel constructs within WebLayer, but how does
    this interaction work?

    Goals
        Interaction must be intuitive to DSL user
        Languages must be as separate as possible
                   For the sake of reusability
           Generated code must statically link

    Our solution
    Separate compilation for each DSL, communicating essential
    information through interface files.


                                 Center for Software Technology   Sander Mak
Developing Interacting Domain Specific Languages > Interaction


 DSL Interaction

 Separate compilation illustrated
   We can use DomainModel constructs within WebLayer, but how does
   this interaction work?

    Goals
        Interaction must be intuitive to DSL user
        Languages must be as separate as possible
                   For the sake of reusability
           Generated code must statically link

    Our solution
    Separate compilation for each DSL, communicating essential
    information through interface files.


                                 Center for Software Technology   Sander Mak
Developing Interacting Domain Specific Languages > Interaction


 Interface files
    DSL compiler emits interface file. We chose ATerms as generic
    representation format.

    Interface characteristics
         Aggregates information
           Contains disambiguated information
           Contains linking information (types, hooks)
           Written interface guarantees a consistent, checked module to be
           present




                                 Center for Software Technology         Sander Mak
Developing Interacting Domain Specific Languages > Interaction


 Interface files
    DSL compiler emits interface file. We chose ATerms as generic
    representation format.

    Interface characteristics
         Aggregates information
           Contains disambiguated information
           Contains linking information (types, hooks)
           Written interface guarantees a consistent, checked module to be
           present

           One way to view interface file mechanism is as cache for compiler
           operations



                                 Center for Software Technology         Sander Mak
Developing Interacting Domain Specific Languages > Interaction


 Interface files
    DSL compiler emits interface file. We chose ATerms as generic
    representation format.

    Interface characteristics
         Aggregates information
       Q: Why cache, are these operations so expensive?
       A: No, not at all. The information the importing compiler
         Contains disambiguated issue is that
       otherwise needs toinformation (types, hooks)
         Contains linking know how to perform these operations. We
       don’t want that, since it breaks our notion of modular interacting
         Written interface guarantees a consistent, checked module to be
       languages!
         present

           One way to view interface file mechanism is as cache for compiler
           operations



                                 Center for Software Technology         Sander Mak
Developing Interacting Domain Specific Languages > Interaction


 Interface files
    DSL compiler emits interface file. We chose ATerms as generic
    representation format.

    Interface characteristics
         Aggregates information
           Contains disambiguated information
           Contains linking information (types, hooks)
           Written interface guarantees a consistent, checked module to be
           present

           One way to view interface file mechanism is as cache for compiler
           operations
           Issues: explicit vs. implicit interface, cyclic dependencies between
           DSLs
                                 Center for Software Technology             Sander Mak
Developing Interacting Domain Specific Languages > Reflection


 Does this approach really work?
    Promises of model driven software development:
           Gain productivity
           Gain quality

                                                     ... so do we live up to this expectation?




                                 Center for Software Technology                           Sander Mak
Developing Interacting Domain Specific Languages > Reflection


 Does this approach really work?
    Promises of model driven software development:
           Gain productivity
           Gain quality
    LoC metrics - Blog example                ... so do we live up to this expectation?
                                        DSL Source Generated code
      DomainModel                       45
               Java                                   801
               XML                                    22
      WebLayer                          110
               Java                                   841
        XML/Facelets                                  501
               XML                                    48
                                                                        ∼ ×14
      Totals                            155           2213

                                 Center for Software Technology                    Sander Mak
Developing Interacting Domain Specific Languages > Reflection


 Does this approach really work?
    Promises of model driven software development:
           Gain productivity
           Gain quality

                                                     ... so do we live up to this expectation?

    Productivity:
      1 The factor ∼14 increase in LoC seems to be typical

      2 DRY: refactoring in DSL code is much easier

      3 Start-up costs manageable




                                 Center for Software Technology                           Sander Mak
Developing Interacting Domain Specific Languages > Reflection


 Does this approach really work?
    Promises of model driven software development:
           Gain productivity
           Gain quality

                                                     ... so do we live up to this expectation?

    Productivity:
      1 The factor ∼14 increase in LoC seems to be typical

      2 DRY: refactoring in DSL code is much easier

      3 Start-up costs manageable

    Quality:
      1 DSL Type checker guarantees correctness of dynamic

        constructions (and there’s much of that in Java web frameworks!)
      2 Typed, explicit dataflow between pages

      3 Concrete example: guaranteed prevention of cross-site scripting

                                 Center for Software Technology                           Sander Mak
Developing Interacting Domain Specific Languages > Reflection


 Drawbacks of our approach


    Every semantic check must be written from scratch
           For each DSL
           Type checking, resolving symbolic references, and so on
           Fortunately, we can get very specific with our checks and
           associated messages




                                 Center for Software Technology       Sander Mak
Developing Interacting Domain Specific Languages > Reflection


 Drawbacks of our approach


    Every semantic check must be written from scratch
           For each DSL
           Type checking, resolving symbolic references, and so on
           Fortunately, we can get very specific with our checks and
           associated messages

    Module system must be written from scratch
           This might be solved generically (parameterizing over interface
           definitions), though we have not researched this




                                 Center for Software Technology              Sander Mak
Developing Interacting Domain Specific Languages > Reflection


 Drawbacks of our approach


    Every semantic check must be written from scratch
           For each DSL
           Type checking, resolving symbolic references, and so on
           Fortunately, we can get very specific with our checks and
           associated messages

    Module system must be written from scratch
           This might be solved generically (parameterizing over interface
           definitions), though we have not researched this

    What are the semantics of our DSLs?


                                 Center for Software Technology              Sander Mak
Developing Interacting Domain Specific Languages > Reflection


 Alternative approaches



           Embedded DSLs

           Asynchronous, runtime linking of generated code (independent
           code generation)

           Larger role for the IDE

           Long-term: active libraries and a universal language




                                 Center for Software Technology           Sander Mak
Developing Interacting Domain Specific Languages > Reflection


 Alternative approaches



           Embedded DSLs

           Asynchronous, runtime linking of generated code (independent
           code generation)

           Larger role for the IDE

           Long-term: active libraries and a universal language
                  Realistically, this probably never happens




                                 Center for Software Technology           Sander Mak
Developing Interacting Domain Specific Languages > Conclusion


 Demonstration




                                 Center for Software Technology   Sander Mak
Developing Interacting Domain Specific Languages > Conclusion


 Topics not discussed
              ... but interesting nevertheless



           Actual implementation details of compilers
       1

                  Implemented using Stratego/XT toolkit
           BusinessRules interface definition
       2

                  To overcome limitations of WebLayer action language in multiple
                  DSL style
           Interaction with GPL code
       3

                  Necessary for real-world adoptation, but how to implement it?
           Much more context and related work
       4




                                                          ... my thesis will be available shortly


                                 Center for Software Technology                              Sander Mak
Developing Interacting Domain Specific Languages > Conclusion


 Concluding remarks


           Interacting DSLs indeed feasible
                  Especially suited for layered architectures (like web-applications)
                  DSLs encode principled usage of frameworks and framework
                  interaction
           Interaction implemented through interface files
                  Separate compilation allows for reuse of DSLs
                  Implicit interface may be a limiting factor


    DSLs for technical domains are a serious option for a company to
    pursue, with demonstrated advantages, but also requiring considerable
    effort.



                                 Center for Software Technology                     Sander Mak

Contenu connexe

Tendances

Docfacto release 2.4
Docfacto release 2.4Docfacto release 2.4
Docfacto release 2.4Darren Hudson
 
Alms analysis presentation
Alms analysis presentationAlms analysis presentation
Alms analysis presentationOpenEdBlogger
 
Bikram kishor rout
Bikram kishor routBikram kishor rout
Bikram kishor routBikram Rout
 
Training report anish
Training report anishTraining report anish
Training report anishAnish Yadav
 
V.S.VamsiKrishna
V.S.VamsiKrishnaV.S.VamsiKrishna
V.S.VamsiKrishnavamsisvk
 
BALAJI K _Resume
BALAJI K _ResumeBALAJI K _Resume
BALAJI K _ResumeBalaji K
 
Psi multi accessgateway_casestudy
Psi multi accessgateway_casestudyPsi multi accessgateway_casestudy
Psi multi accessgateway_casestudyPrimesoftinc
 
Model-Driven Software Development
Model-Driven Software DevelopmentModel-Driven Software Development
Model-Driven Software Developmentelliando dias
 
20090410 J Spring Pragmatic Model Driven Development In Java Using Smart
20090410   J Spring Pragmatic Model Driven Development In Java Using Smart20090410   J Spring Pragmatic Model Driven Development In Java Using Smart
20090410 J Spring Pragmatic Model Driven Development In Java Using SmartSander Hoogendoorn
 
Project P erts2012
Project P erts2012Project P erts2012
Project P erts2012AdaCore
 
DDS Programming with IDL to C++11 tutorial
DDS Programming with IDL to C++11 tutorialDDS Programming with IDL to C++11 tutorial
DDS Programming with IDL to C++11 tutorialRemedy IT
 

Tendances (20)

DishitJoshi_CV
DishitJoshi_CVDishitJoshi_CV
DishitJoshi_CV
 
JelitaAsianCV
JelitaAsianCVJelitaAsianCV
JelitaAsianCV
 
Docfacto release 2.4
Docfacto release 2.4Docfacto release 2.4
Docfacto release 2.4
 
Mohamed el abacy
Mohamed el abacyMohamed el abacy
Mohamed el abacy
 
Alms analysis presentation
Alms analysis presentationAlms analysis presentation
Alms analysis presentation
 
UnnivmNew
UnnivmNewUnnivmNew
UnnivmNew
 
Bikram kishor rout
Bikram kishor routBikram kishor rout
Bikram kishor rout
 
DinakaraPandian_9+
DinakaraPandian_9+DinakaraPandian_9+
DinakaraPandian_9+
 
Training report anish
Training report anishTraining report anish
Training report anish
 
Madhurima_Resume
Madhurima_ResumeMadhurima_Resume
Madhurima_Resume
 
V.S.VamsiKrishna
V.S.VamsiKrishnaV.S.VamsiKrishna
V.S.VamsiKrishna
 
BALAJI K _Resume
BALAJI K _ResumeBALAJI K _Resume
BALAJI K _Resume
 
Psi multi accessgateway_casestudy
Psi multi accessgateway_casestudyPsi multi accessgateway_casestudy
Psi multi accessgateway_casestudy
 
Model-Driven Software Development
Model-Driven Software DevelopmentModel-Driven Software Development
Model-Driven Software Development
 
Dave 3 presentation
Dave 3 presentationDave 3 presentation
Dave 3 presentation
 
20090410 J Spring Pragmatic Model Driven Development In Java Using Smart
20090410   J Spring Pragmatic Model Driven Development In Java Using Smart20090410   J Spring Pragmatic Model Driven Development In Java Using Smart
20090410 J Spring Pragmatic Model Driven Development In Java Using Smart
 
Project P erts2012
Project P erts2012Project P erts2012
Project P erts2012
 
RTF - Prasad bhatt
RTF - Prasad bhattRTF - Prasad bhatt
RTF - Prasad bhatt
 
Siva_CV_2016
Siva_CV_2016Siva_CV_2016
Siva_CV_2016
 
DDS Programming with IDL to C++11 tutorial
DDS Programming with IDL to C++11 tutorialDDS Programming with IDL to C++11 tutorial
DDS Programming with IDL to C++11 tutorial
 

En vedette

九方中文輸入法 特徵簡介
九方中文輸入法 特徵簡介九方中文輸入法 特徵簡介
九方中文輸入法 特徵簡介Warren Yip
 
Vip Program by Proforma Amplified
Vip Program by Proforma AmplifiedVip Program by Proforma Amplified
Vip Program by Proforma AmplifiedJim Hanika
 
Text Analytics -- анализ неструктурированных данных
Text Analytics -- анализ неструктурированных данныхText Analytics -- анализ неструктурированных данных
Text Analytics -- анализ неструктурированных данныхAlexey Kononenko
 
Hagainitiativet Nina Ekelund 14 april 2011
Hagainitiativet Nina Ekelund 14 april 2011Hagainitiativet Nina Ekelund 14 april 2011
Hagainitiativet Nina Ekelund 14 april 2011Klimatkommunerna
 
Ib learner profile
Ib learner profileIb learner profile
Ib learner profilekatyaSh
 
Using Innovation Games To Prioritize Technical Debt Pub
Using Innovation Games To Prioritize Technical Debt PubUsing Innovation Games To Prioritize Technical Debt Pub
Using Innovation Games To Prioritize Technical Debt PubEnthiosys Inc
 
Four Pillars Zone
Four Pillars ZoneFour Pillars Zone
Four Pillars ZoneCarol Moxam
 
Cross-Build Injection attacks: how safe is your Java build?
Cross-Build Injection attacks: how safe is your Java build?Cross-Build Injection attacks: how safe is your Java build?
Cross-Build Injection attacks: how safe is your Java build?Sander Mak (@Sander_Mak)
 
Trust Evaluation through User Reputation and Provenance Analysis
Trust Evaluation through User Reputation and Provenance AnalysisTrust Evaluation through User Reputation and Provenance Analysis
Trust Evaluation through User Reputation and Provenance AnalysisDavide Ceolin
 
Proforma Branded Apps
Proforma Branded AppsProforma Branded Apps
Proforma Branded AppsJim Hanika
 
Contextual Discovery in Business Intelligence
Contextual Discovery in Business IntelligenceContextual Discovery in Business Intelligence
Contextual Discovery in Business Intelligencewww.panorama.com
 
Violating The Rights of The Child; When "Faith" Violates the Faith in Human R...
Violating The Rights of The Child; When "Faith" Violates the Faith in Human R...Violating The Rights of The Child; When "Faith" Violates the Faith in Human R...
Violating The Rights of The Child; When "Faith" Violates the Faith in Human R...Bayan Waleed Shadaideh
 
應用微機電感測科技開發未來智慧生活產品
應用微機電感測科技開發未來智慧生活產品應用微機電感測科技開發未來智慧生活產品
應用微機電感測科技開發未來智慧生活產品開放式概念發表平臺
 
08 necto working_with_kpi_ready
08 necto working_with_kpi_ready08 necto working_with_kpi_ready
08 necto working_with_kpi_readywww.panorama.com
 

En vedette (20)

九方中文輸入法 特徵簡介
九方中文輸入法 特徵簡介九方中文輸入法 特徵簡介
九方中文輸入法 特徵簡介
 
Unenclosable
UnenclosableUnenclosable
Unenclosable
 
Vip Program by Proforma Amplified
Vip Program by Proforma AmplifiedVip Program by Proforma Amplified
Vip Program by Proforma Amplified
 
Text Analytics -- анализ неструктурированных данных
Text Analytics -- анализ неструктурированных данныхText Analytics -- анализ неструктурированных данных
Text Analytics -- анализ неструктурированных данных
 
Hagainitiativet Nina Ekelund 14 april 2011
Hagainitiativet Nina Ekelund 14 april 2011Hagainitiativet Nina Ekelund 14 april 2011
Hagainitiativet Nina Ekelund 14 april 2011
 
Ib learner profile
Ib learner profileIb learner profile
Ib learner profile
 
Unenclosable
UnenclosableUnenclosable
Unenclosable
 
2009成果展-實況報導
2009成果展-實況報導2009成果展-實況報導
2009成果展-實況報導
 
Kommunikationsplanering
KommunikationsplaneringKommunikationsplanering
Kommunikationsplanering
 
Using Innovation Games To Prioritize Technical Debt Pub
Using Innovation Games To Prioritize Technical Debt PubUsing Innovation Games To Prioritize Technical Debt Pub
Using Innovation Games To Prioritize Technical Debt Pub
 
West E Port
West E PortWest E Port
West E Port
 
Four Pillars Zone
Four Pillars ZoneFour Pillars Zone
Four Pillars Zone
 
Cross-Build Injection attacks: how safe is your Java build?
Cross-Build Injection attacks: how safe is your Java build?Cross-Build Injection attacks: how safe is your Java build?
Cross-Build Injection attacks: how safe is your Java build?
 
Trust Evaluation through User Reputation and Provenance Analysis
Trust Evaluation through User Reputation and Provenance AnalysisTrust Evaluation through User Reputation and Provenance Analysis
Trust Evaluation through User Reputation and Provenance Analysis
 
Proforma Branded Apps
Proforma Branded AppsProforma Branded Apps
Proforma Branded Apps
 
Contextual Discovery in Business Intelligence
Contextual Discovery in Business IntelligenceContextual Discovery in Business Intelligence
Contextual Discovery in Business Intelligence
 
Violating The Rights of The Child; When "Faith" Violates the Faith in Human R...
Violating The Rights of The Child; When "Faith" Violates the Faith in Human R...Violating The Rights of The Child; When "Faith" Violates the Faith in Human R...
Violating The Rights of The Child; When "Faith" Violates the Faith in Human R...
 
應用微機電感測科技開發未來智慧生活產品
應用微機電感測科技開發未來智慧生活產品應用微機電感測科技開發未來智慧生活產品
應用微機電感測科技開發未來智慧生活產品
 
MetaCurrency1rough
MetaCurrency1roughMetaCurrency1rough
MetaCurrency1rough
 
08 necto working_with_kpi_ready
08 necto working_with_kpi_ready08 necto working_with_kpi_ready
08 necto working_with_kpi_ready
 

Similaire à Developing Interacting Domain Specific Languages (DSLs

DSL, the absolute weapon for the development
DSL, the absolute weapon for the developmentDSL, the absolute weapon for the development
DSL, the absolute weapon for the developmentESUG
 
Model Driven Architectures
Model Driven ArchitecturesModel Driven Architectures
Model Driven ArchitecturesLalit Kale
 
Domain specific modelling (DSM)
Domain specific modelling (DSM)Domain specific modelling (DSM)
Domain specific modelling (DSM)PG Scholar
 
Language Engineering With Xtext
Language Engineering With XtextLanguage Engineering With Xtext
Language Engineering With XtextSven Efftinge
 
Comparative Study of programming Languages
Comparative Study of programming LanguagesComparative Study of programming Languages
Comparative Study of programming LanguagesIshan Monga
 
Stream SQL eventflow visual programming for real programmers presentation
Stream SQL eventflow visual programming for real programmers presentationStream SQL eventflow visual programming for real programmers presentation
Stream SQL eventflow visual programming for real programmers presentationstreambase
 
Class 6: Introduction to web technology entrepreneurship
Class 6: Introduction to web technology entrepreneurshipClass 6: Introduction to web technology entrepreneurship
Class 6: Introduction to web technology entrepreneurshipallanchao
 
Introduction to Domain-Driven Design
Introduction to Domain-Driven DesignIntroduction to Domain-Driven Design
Introduction to Domain-Driven DesignR-P-Azevedo
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven DesignLalit Kale
 
Mahesh_webMethodsProfile
Mahesh_webMethodsProfileMahesh_webMethodsProfile
Mahesh_webMethodsProfilemahesh meesala
 
Mohamed Aashik Ali.A_original - USA
Mohamed Aashik Ali.A_original - USAMohamed Aashik Ali.A_original - USA
Mohamed Aashik Ali.A_original - USAMohamed Ali
 
Cv 7830388-81894-rizwan-farooq
Cv 7830388-81894-rizwan-farooqCv 7830388-81894-rizwan-farooq
Cv 7830388-81894-rizwan-farooqRizwan Farooq
 
Dipalee Shah Resume
Dipalee Shah ResumeDipalee Shah Resume
Dipalee Shah ResumeDipalee Shah
 

Similaire à Developing Interacting Domain Specific Languages (DSLs (20)

DSL, the absolute weapon for the development
DSL, the absolute weapon for the developmentDSL, the absolute weapon for the development
DSL, the absolute weapon for the development
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Model Driven Architectures
Model Driven ArchitecturesModel Driven Architectures
Model Driven Architectures
 
Domain specific modelling (DSM)
Domain specific modelling (DSM)Domain specific modelling (DSM)
Domain specific modelling (DSM)
 
Ravindra Prasad
Ravindra PrasadRavindra Prasad
Ravindra Prasad
 
Language Engineering With Xtext
Language Engineering With XtextLanguage Engineering With Xtext
Language Engineering With Xtext
 
Comparative Study of programming Languages
Comparative Study of programming LanguagesComparative Study of programming Languages
Comparative Study of programming Languages
 
Stream SQL eventflow visual programming for real programmers presentation
Stream SQL eventflow visual programming for real programmers presentationStream SQL eventflow visual programming for real programmers presentation
Stream SQL eventflow visual programming for real programmers presentation
 
Class 6: Introduction to web technology entrepreneurship
Class 6: Introduction to web technology entrepreneurshipClass 6: Introduction to web technology entrepreneurship
Class 6: Introduction to web technology entrepreneurship
 
Introduction to Domain-Driven Design
Introduction to Domain-Driven DesignIntroduction to Domain-Driven Design
Introduction to Domain-Driven Design
 
Sudhir_Resume
Sudhir_ResumeSudhir_Resume
Sudhir_Resume
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Mahesh_webMethodsProfile
Mahesh_webMethodsProfileMahesh_webMethodsProfile
Mahesh_webMethodsProfile
 
Sudhir srivastava profile
Sudhir srivastava profileSudhir srivastava profile
Sudhir srivastava profile
 
Mohamed Aashik Ali.A_original - USA
Mohamed Aashik Ali.A_original - USAMohamed Aashik Ali.A_original - USA
Mohamed Aashik Ali.A_original - USA
 
SAIGANESH CHINTALA_JAVA
SAIGANESH CHINTALA_JAVASAIGANESH CHINTALA_JAVA
SAIGANESH CHINTALA_JAVA
 
Cv 7830388-81894-rizwan-farooq
Cv 7830388-81894-rizwan-farooqCv 7830388-81894-rizwan-farooq
Cv 7830388-81894-rizwan-farooq
 
Vsts intro
Vsts introVsts intro
Vsts intro
 
Resume
ResumeResume
Resume
 
Dipalee Shah Resume
Dipalee Shah ResumeDipalee Shah Resume
Dipalee Shah Resume
 

Plus de Sander Mak (@Sander_Mak)

TypeScript: coding JavaScript without the pain
TypeScript: coding JavaScript without the painTypeScript: coding JavaScript without the pain
TypeScript: coding JavaScript without the painSander Mak (@Sander_Mak)
 
The Ultimate Dependency Manager Shootout (QCon NY 2014)
The Ultimate Dependency Manager Shootout (QCon NY 2014)The Ultimate Dependency Manager Shootout (QCon NY 2014)
The Ultimate Dependency Manager Shootout (QCon NY 2014)Sander Mak (@Sander_Mak)
 
Hibernate Performance Tuning (JEEConf 2012)
Hibernate Performance Tuning (JEEConf 2012)Hibernate Performance Tuning (JEEConf 2012)
Hibernate Performance Tuning (JEEConf 2012)Sander Mak (@Sander_Mak)
 

Plus de Sander Mak (@Sander_Mak) (20)

Scalable Application Development @ Picnic
Scalable Application Development @ PicnicScalable Application Development @ Picnic
Scalable Application Development @ Picnic
 
Coding Your Way to Java 13
Coding Your Way to Java 13Coding Your Way to Java 13
Coding Your Way to Java 13
 
Coding Your Way to Java 12
Coding Your Way to Java 12Coding Your Way to Java 12
Coding Your Way to Java 12
 
Java Modularity: the Year After
Java Modularity: the Year AfterJava Modularity: the Year After
Java Modularity: the Year After
 
Desiging for Modularity with Java 9
Desiging for Modularity with Java 9Desiging for Modularity with Java 9
Desiging for Modularity with Java 9
 
Modules or microservices?
Modules or microservices?Modules or microservices?
Modules or microservices?
 
Migrating to Java 9 Modules
Migrating to Java 9 ModulesMigrating to Java 9 Modules
Migrating to Java 9 Modules
 
Java 9 Modularity in Action
Java 9 Modularity in ActionJava 9 Modularity in Action
Java 9 Modularity in Action
 
Java modularity: life after Java 9
Java modularity: life after Java 9Java modularity: life after Java 9
Java modularity: life after Java 9
 
Provisioning the IoT
Provisioning the IoTProvisioning the IoT
Provisioning the IoT
 
Event-sourced architectures with Akka
Event-sourced architectures with AkkaEvent-sourced architectures with Akka
Event-sourced architectures with Akka
 
TypeScript: coding JavaScript without the pain
TypeScript: coding JavaScript without the painTypeScript: coding JavaScript without the pain
TypeScript: coding JavaScript without the pain
 
The Ultimate Dependency Manager Shootout (QCon NY 2014)
The Ultimate Dependency Manager Shootout (QCon NY 2014)The Ultimate Dependency Manager Shootout (QCon NY 2014)
The Ultimate Dependency Manager Shootout (QCon NY 2014)
 
Modular JavaScript
Modular JavaScriptModular JavaScript
Modular JavaScript
 
Modularity in the Cloud
Modularity in the CloudModularity in the Cloud
Modularity in the Cloud
 
Scala & Lift (JEEConf 2012)
Scala & Lift (JEEConf 2012)Scala & Lift (JEEConf 2012)
Scala & Lift (JEEConf 2012)
 
Hibernate Performance Tuning (JEEConf 2012)
Hibernate Performance Tuning (JEEConf 2012)Hibernate Performance Tuning (JEEConf 2012)
Hibernate Performance Tuning (JEEConf 2012)
 
Akka (BeJUG)
Akka (BeJUG)Akka (BeJUG)
Akka (BeJUG)
 
Fork Join (BeJUG 2012)
Fork Join (BeJUG 2012)Fork Join (BeJUG 2012)
Fork Join (BeJUG 2012)
 
Fork/Join for Fun and Profit!
Fork/Join for Fun and Profit!Fork/Join for Fun and Profit!
Fork/Join for Fun and Profit!
 

Dernier

Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 

Dernier (20)

Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 

Developing Interacting Domain Specific Languages (DSLs

  • 1. Developing Interacting Domain Specific Languages Developing Interacting Domain Specific Languages Master’s thesis Sander Mak Center for Software Technology, Universiteit Utrecht October 25, 2007 Supervisor : Doaitse Swierstra Daily supervision : Bastiaan Heeren Eelco Visser Center for Software Technology Sander Mak
  • 2. Developing Interacting Domain Specific Languages > Introduction Outline Introduction 1 DomainModel 2 WebLayer 3 Interaction 4 Reflection 5 Conclusion 6 Center for Software Technology Sander Mak
  • 3. Developing Interacting Domain Specific Languages > Introduction Domain Specific Language Increased productivity Increased quality Advantages: Clarity by abstraction Center for Software Technology Sander Mak
  • 4. Developing Interacting Domain Specific Languages > Introduction Languages? Why the plural, i.e. DSLs Center for Software Technology Sander Mak
  • 5. Developing Interacting Domain Specific Languages > Introduction Languages? Why the plural, i.e. DSLs One-size fits all, monolithic approaches generally not succesful (like 4GLs) Separation of concerns, and: reusability of DSL in other contexts Premise: Technical domains are a good unit of composition Center for Software Technology Sander Mak
  • 6. Developing Interacting Domain Specific Languages > Introduction Languages? Why the plural, i.e. DSLs One-size fits all, monolithic approaches generally not succesful (like 4GLs) Separation of concerns, and: reusability of DSL in other contexts Premise: Technical domains are a good unit of composition Center for Software Technology Sander Mak
  • 7. Developing Interacting Domain Specific Languages > Introduction Languages? Why the plural, i.e. DSLs One-size fits all, monolithic approaches generally not succesful (like 4GLs) Separation of concerns, and: reusability of DSL in other contexts Premise: Technical domains are a good unit of composition Research questions: Are multiple interacting DSLs feasible? 1 How should interaction be concretized and implemented? 2 Center for Software Technology Sander Mak
  • 8. Developing Interacting Domain Specific Languages > Introduction The case study DomainModel Modeling domain data, generating JPA (similar to Hibernate) implementation WebLayer Modeling the view side of web-applications, generating Seam/JSF/Facelets BusinessRules Modeling functionality specific to a domain Different compilers, one goal: build a complete Java based web-app Center for Software Technology Sander Mak
  • 9. Developing Interacting Domain Specific Languages > Introduction Goals Why create DSLs for these domains: Increase productivity Abstract away from implementation details, focus on domain concepts (also gives more clarity) Java frameworks are (inherently?) verbose Increase quality Dynamic, interpreted mechanisms subvert static safety of Java code Report domain specific errors Center for Software Technology Sander Mak
  • 10. Developing Interacting Domain Specific Languages > Introduction Goals Why create DSLs for these domains: Increase productivity Abstract away from implementation details, focus on domain concepts (also gives more clarity) Java frameworks are (inherently?) verbose Increase quality Dynamic, interpreted mechanisms subvert static safety of Java code Report domain specific errors What is explicitly not our goal: creation of production quality languages, unleashing every bit of power of target frameworks Center for Software Technology Sander Mak
  • 11. Developing Interacting Domain Specific Languages > Introduction Goals Why create DSLs for these domains: Intended use Increase productivity To create data-intensive web-applications, focus on confines of within domain Abstract away from implementation details, company guidelines. gives more clarity) concepts (also Java frameworks are (inherently?) verbose Increase quality Dynamic, interpreted mechanisms subvert static safety of Java code ‘You can’t be everything to everyone, Report domain specific errors so be something for someone’ What is explicitly not our goal: creation of production quality languages, unleashing every bit of power of target frameworks Center for Software Technology Sander Mak
  • 12. Developing Interacting Domain Specific Languages > DomainModel DomainModel language Language for defining persistent domain (or data) models Essential features: Concise definition of concepts (entities) Generates JPA implementation (standardized library) Encodes domain specific technical knowledge (e.g. object identity) Allows for domain specific semantic checking May be used in combination with different DSLs Center for Software Technology Sander Mak
  • 13. Developing Interacting Domain Specific Languages > DomainModel Concept definition concept BlogEntry { title :: String (name, required) abstract :: String contents :: String (required) user -> User date :: Date (name) tags -> [Tag] replies <> [Reply] category :: {quot;Technicalquot; : TECH, quot;Otherquot; : NONTECH} trackback :: URL } Center for Software Technology Sander Mak
  • 14. Developing Interacting Domain Specific Languages > DomainModel Concept definition concept BlogEntry { title :: String (name, required) abstract :: String contents :: String (required) user -> User date :: Date (name) tags -> [Tag] replies <> [Reply] category :: {quot;Technicalquot; : TECH, quot;Otherquot; : NONTECH} trackback :: URL } Types: Value, Extended (validated), Concept, List, Enumeration Center for Software Technology Sander Mak
  • 15. Developing Interacting Domain Specific Languages > DomainModel Concept definition concept BlogEntry { title :: String (name, required) abstract :: String contents :: String (required) user -> User date :: Date (name) tags -> [Tag] replies <> [Reply] category :: {quot;Technicalquot; : TECH, quot;Otherquot; : NONTECH} trackback :: URL } Types: Value, Extended (validated), Concept, List, Enumeration Center for Software Technology Sander Mak
  • 16. Developing Interacting Domain Specific Languages > DomainModel Concept definition concept BlogEntry { title :: String (name, required) abstract :: String contents :: String (required) user -> User date :: Date (name) tags -> [Tag] replies <> [Reply] category :: {quot;Technicalquot; : TECH, quot;Otherquot; : NONTECH} trackback :: URL } Types: Value, Extended (validated), Concept, List, Enumeration Center for Software Technology Sander Mak
  • 17. Developing Interacting Domain Specific Languages > DomainModel Concept definition concept BlogEntry { title :: String (name, required) abstract :: String contents :: String (required) user -> User date :: Date (name) tags -> [Tag] replies <> [Reply] category :: {quot;Technicalquot; : TECH, quot;Otherquot; : NONTECH} trackback :: URL } Types: Value, Extended (validated), Concept, List, Enumeration Center for Software Technology Sander Mak
  • 18. Developing Interacting Domain Specific Languages > DomainModel Concept definition concept BlogEntry { title :: String (name, required) abstract :: String contents :: String (required) user -> User date :: Date (name) tags -> [Tag] replies <> [Reply] category :: {quot;Technicalquot; : TECH, quot;Otherquot; : NONTECH} trackback :: URL } Types: Value, Extended (validated), Concept, List, Enumeration Center for Software Technology Sander Mak
  • 19. Developing Interacting Domain Specific Languages > DomainModel Concept definition concept BlogEntry { title :: String (name, required) abstract :: String contents :: String (required) user -> User date :: Date (name) tags -> [Tag] replies <> [Reply] category :: {quot;Technicalquot; : TECH, quot;Otherquot; : NONTECH} trackback :: URL } Associations: Value, Reference, Composite Center for Software Technology Sander Mak
  • 20. Developing Interacting Domain Specific Languages > DomainModel Concept definition concept BlogEntry { title :: String (name, required) abstract :: String contents :: String (required) user -> User date :: Date (name) tags -> [Tag] replies <> [Reply] category :: {quot;Technicalquot; : TECH, quot;Otherquot; : NONTECH} trackback :: URL } Associations: Value, Reference, Composite Center for Software Technology Sander Mak
  • 21. Developing Interacting Domain Specific Languages > DomainModel Concept definition concept BlogEntry { title :: String (name, required) abstract :: String contents :: String (required) user -> User date :: Date (name) tags -> [Tag] replies <> [Reply] category :: {quot;Technicalquot; : TECH, quot;Otherquot; : NONTECH} trackback :: URL } Associations: Value, Reference, Composite Center for Software Technology Sander Mak
  • 22. Developing Interacting Domain Specific Languages > DomainModel Concept definition concept BlogEntry { title :: String (name, required) abstract :: String contents :: String (required) user -> User date :: Date (name) tags -> [Tag] replies <> [Reply] category :: {quot;Technicalquot; : TECH, quot;Otherquot; : NONTECH} trackback :: URL } DomainModel annotations Center for Software Technology Sander Mak
  • 23. Developing Interacting Domain Specific Languages > DomainModel Concept definition concept BlogEntry { title :: String (name, required) abstract :: String contents :: String (required) user -> User date :: Date (name) tags -> [Tag] replies <> [Reply] category :: {quot;Technicalquot; : TECH, quot;Otherquot; : NONTECH} trackback :: URL } DomainModel annotations Center for Software Technology Sander Mak
  • 24. Developing Interacting Domain Specific Languages > DomainModel Concept definition concept BlogEntry { title :: String (name, required) abstract :: String Compiling a DomainModel concept contents :: String (required) Definition -> User BlogEntry results in BlogEntry.java, a user persistable:: Date JPA entity: (name) date tags -> [Tag] replies <> [Reply] 268 LoC category :: {quot;Technicalquot; : TECH, quot;Otherquot; : NONTECH} trackback :: URL } DomainModel annotations Center for Software Technology Sander Mak
  • 25. Developing Interacting Domain Specific Languages > DomainModel Concept definition concept BlogEntry { Q: Isn’t DomainModel almost the same as UML Class diagrams? title :: String (name, required) A: Yes! abstract :: String contents :: String (required) userWe even ’borrowed’ some of the association symbols -> User date ’− :: Date >’ for references (name) ’<>’ for composites tags -> [Tag] replies way, prior UML knowledge helps when using <> [Reply] That category :: {quot;Technicalquot; : TECH, quot;Otherquot; : NONTECH} DomainModel trackback :: URL UML class diagram could serve as input for Theoretically, a } the DomainModel compiler (if only we had a UML front-end) DomainModel annotations Center for Software Technology Sander Mak
  • 26. Developing Interacting Domain Specific Languages > WebLayer WebLayer language Language for defining pages (views) in web-app Essential features: Works seamlessly with DomainModel definitions Abstracts away from the Seam framework and Java intricacies Strongly typed Explicit, checked data-flow between pages Generic constructs Center for Software Technology Sander Mak
  • 27. Developing Interacting Domain Specific Languages > WebLayer WebLayer compiler Center for Software Technology Sander Mak
  • 28. Developing Interacting Domain Specific Languages > WebLayer Page definition page ViewBlog(BlogEntry be, User u){ var Reply r header(be.title + quot; (written on quot; + be.date + quot;)quot;) text(be.contents) table Tag t in be.tags { quot;Assigned tagsquot; -> t.tagName } quot;Reply to this post:quot; form( input(r) action( quot;Add replyquot; , r.user = u; be.replies.add(r); be.save()) ) text(quot;Replies for post quot; + be.title + quot; :quot;) for Reply r in be.replies { show(r) } navigate(quot;Homequot;, Blog(u)) } Center for Software Technology Sander Mak
  • 29. Developing Interacting Domain Specific Languages > WebLayer Page definition page ViewBlog(BlogEntry be, User u){ var Reply r header(be.title + quot; (written on quot; + be.date + quot;)quot;) text(be.contents) table Tag t in be.tags { quot;Assigned tagsquot; -> t.tagName } quot;Reply to this post:quot; form( input(r) action( quot;Add replyquot; , r.user = u; be.replies.add(r); be.save()) ) text(quot;Replies for post quot; + be.title + quot; :quot;) for Reply r in be.replies { show(r) } navigate(quot;Homequot;, Blog(u)) } Center for Software Technology Sander Mak
  • 30. Developing Interacting Domain Specific Languages > WebLayer Page definition page ViewBlog(BlogEntry be, User u){ Multiple page definitions in one file, starting with a header: var Reply r weblayer blog header(be.title + quot; (written on quot; + be.date + quot;)quot;) text(be.contents) using domainmodel blog{ quot;Assigned tagsquot; -> t.tagName } table Tag t in be.tags quot;Reply to this post:quot; form( input(r) action( quot;Add replyquot; , r.user = u; be.replies.add(r); be.save()) ) text(quot;Replies for post quot; + be.title + quot; :quot;) for Reply r in be.replies { show(r) } navigate(quot;Homequot;, Blog(u)) } Center for Software Technology Sander Mak
  • 31. Developing Interacting Domain Specific Languages > WebLayer Page definition page ViewBlog(BlogEntry be, User u){ var Reply r header(be.title + quot; (written on quot; + be.date + quot;)quot;) text(be.contents) table Tag t in be.tags { quot;Assigned tagsquot; -> t.tagName } quot;Reply to this post:quot; form( input(r) action( quot;Add replyquot; , r.user = u; be.replies.add(r); be.save()) ) text(quot;Replies for post quot; + be.title + quot; :quot;) for Reply r in be.replies { show(r) } navigate(quot;Homequot;, Blog(u)) } Center for Software Technology Sander Mak
  • 32. Developing Interacting Domain Specific Languages > WebLayer Page definition page ViewBlog(BlogEntry be, User u){ var Reply r header(be.title + quot; (written on quot; + be.date + quot;)quot;) text(be.contents) table Tag t in be.tags { quot;Assigned tagsquot; -> t.tagName } quot;Reply to this post:quot; form( input(r) action( quot;Add replyquot; , r.user = u; be.replies.add(r); be.save()) ) text(quot;Replies for post quot; + be.title + quot; :quot;) for Reply r in be.replies { show(r) } navigate(quot;Homequot;, Blog(u)) } Center for Software Technology Sander Mak
  • 33. Developing Interacting Domain Specific Languages > WebLayer Page definition page ViewBlog(BlogEntry be, User u){ var Reply r header(be.title + quot; (written on quot; + be.date + quot;)quot;) text(be.contents) table Tag t in be.tags { quot;Assigned tagsquot; -> t.tagName } quot;Reply to this post:quot; form( input(r) action( quot;Add replyquot; , r.user = u; be.replies.add(r); be.save()) ) text(quot;Replies for post quot; + be.title + quot; :quot;) for Reply r in be.replies { show(r) } navigate(quot;Homequot;, Blog(u)) } Center for Software Technology Sander Mak
  • 34. Developing Interacting Domain Specific Languages > WebLayer Page definition page ViewBlog(BlogEntry be, User u){ var Reply r header(be.title + quot; (written on quot; + be.date + quot;)quot;) text(be.contents) table Tag t in be.tags { quot;Assigned tagsquot; -> t.tagName } quot;Reply to this post:quot; form( input(r) action( quot;Add replyquot; , r.user = u; be.replies.add(r); be.save()) ) text(quot;Replies for post quot; + be.title + quot; :quot;) for Reply r in be.replies { show(r) } navigate(quot;Homequot;, Blog(u)) } Center for Software Technology Sander Mak
  • 35. Developing Interacting Domain Specific Languages > WebLayer Page definition page ViewBlog(BlogEntry be, User u){ var Reply r header(be.title + quot; (written on quot; + be.date + quot;)quot;) text(be.contents) table Tag t in be.tags { quot;Assigned tagsquot; -> t.tagName } quot;Reply to this post:quot; form( input(r) action( quot;Add replyquot; , r.user = u; be.replies.add(r); be.save()) ) text(quot;Replies for post quot; + be.title + quot; :quot;) for Reply r in be.replies { show(r) } navigate(quot;Homequot;, Blog(u)) } Center for Software Technology Sander Mak
  • 36. Developing Interacting Domain Specific Languages > WebLayer Page definition page ViewBlog(BlogEntry be, User u){ var Reply r header(be.title + quot; (written on quot; + be.date + quot;)quot;) text(be.contents) table Tag t in be.tags { quot;Assigned tagsquot; -> t.tagName } quot;Reply to this post:quot; form( input(r) action( quot;Add replyquot; , r.user = u; be.replies.add(r); be.save()) ) text(quot;Replies for post quot; + be.title + quot; :quot;) for Reply r in be.replies { show(r) } navigate(quot;Homequot;, Blog(u)) } Center for Software Technology Sander Mak
  • 37. Developing Interacting Domain Specific Languages > WebLayer Page definition page ViewBlog(BlogEntry be, User u){ var Reply r header(be.title + quot; (written on quot; + be.date + quot;)quot;) text(be.contents) Ideas for extension table Tag t in be.tags { quot;Assigned tagsquot; -> t.tagName } Query language quot;Reply to this page abstraction Partial post:quot; form( input(r) Parameterized, reusable actions action( quot;Add replyquot; ... , r.user = u; be.replies.add(r); be.save()) ) text(quot;Replies for post quot; + be.title + quot; :quot;) for Reply r in be.replies { show(r) } navigate(quot;Homequot;, Blog(u)) } Center for Software Technology Sander Mak
  • 38. Developing Interacting Domain Specific Languages > WebLayer Issues Layout is more or less fixed Example: every page element is placed beneath each other We don’t want to replicate all of HTML inside WebLayer Partial solution: embed generated page in freely editable template For the rest: make assumptions, although compiler becomes more specific Editing lists Our solution is specific and ad-hoc Action language Why not, for example, embed Java? Center for Software Technology Sander Mak
  • 39. Developing Interacting Domain Specific Languages > Interaction DSL Interaction We can use DomainModel constructs within WebLayer, but how does this interaction work? Goals Interaction must be intuitive to DSL user Languages must be as separate as possible For the sake of reusability Generated code must statically link Center for Software Technology Sander Mak
  • 40. Developing Interacting Domain Specific Languages > Interaction DSL Interaction We can use DomainModel constructs within WebLayer, but how does this interaction work? Goals Interaction must be intuitive to DSL user Languages must be as separate as possible For the sake of reusability Generated code must statically link Our solution Separate compilation for each DSL, communicating essential information through interface files. Center for Software Technology Sander Mak
  • 41. Developing Interacting Domain Specific Languages > Interaction DSL Interaction Separate compilation illustrated We can use DomainModel constructs within WebLayer, but how does this interaction work? Goals Interaction must be intuitive to DSL user Languages must be as separate as possible For the sake of reusability Generated code must statically link Our solution Separate compilation for each DSL, communicating essential information through interface files. Center for Software Technology Sander Mak
  • 42. Developing Interacting Domain Specific Languages > Interaction Interface files DSL compiler emits interface file. We chose ATerms as generic representation format. Interface characteristics Aggregates information Contains disambiguated information Contains linking information (types, hooks) Written interface guarantees a consistent, checked module to be present Center for Software Technology Sander Mak
  • 43. Developing Interacting Domain Specific Languages > Interaction Interface files DSL compiler emits interface file. We chose ATerms as generic representation format. Interface characteristics Aggregates information Contains disambiguated information Contains linking information (types, hooks) Written interface guarantees a consistent, checked module to be present One way to view interface file mechanism is as cache for compiler operations Center for Software Technology Sander Mak
  • 44. Developing Interacting Domain Specific Languages > Interaction Interface files DSL compiler emits interface file. We chose ATerms as generic representation format. Interface characteristics Aggregates information Q: Why cache, are these operations so expensive? A: No, not at all. The information the importing compiler Contains disambiguated issue is that otherwise needs toinformation (types, hooks) Contains linking know how to perform these operations. We don’t want that, since it breaks our notion of modular interacting Written interface guarantees a consistent, checked module to be languages! present One way to view interface file mechanism is as cache for compiler operations Center for Software Technology Sander Mak
  • 45. Developing Interacting Domain Specific Languages > Interaction Interface files DSL compiler emits interface file. We chose ATerms as generic representation format. Interface characteristics Aggregates information Contains disambiguated information Contains linking information (types, hooks) Written interface guarantees a consistent, checked module to be present One way to view interface file mechanism is as cache for compiler operations Issues: explicit vs. implicit interface, cyclic dependencies between DSLs Center for Software Technology Sander Mak
  • 46. Developing Interacting Domain Specific Languages > Reflection Does this approach really work? Promises of model driven software development: Gain productivity Gain quality ... so do we live up to this expectation? Center for Software Technology Sander Mak
  • 47. Developing Interacting Domain Specific Languages > Reflection Does this approach really work? Promises of model driven software development: Gain productivity Gain quality LoC metrics - Blog example ... so do we live up to this expectation? DSL Source Generated code DomainModel 45 Java 801 XML 22 WebLayer 110 Java 841 XML/Facelets 501 XML 48 ∼ ×14 Totals 155 2213 Center for Software Technology Sander Mak
  • 48. Developing Interacting Domain Specific Languages > Reflection Does this approach really work? Promises of model driven software development: Gain productivity Gain quality ... so do we live up to this expectation? Productivity: 1 The factor ∼14 increase in LoC seems to be typical 2 DRY: refactoring in DSL code is much easier 3 Start-up costs manageable Center for Software Technology Sander Mak
  • 49. Developing Interacting Domain Specific Languages > Reflection Does this approach really work? Promises of model driven software development: Gain productivity Gain quality ... so do we live up to this expectation? Productivity: 1 The factor ∼14 increase in LoC seems to be typical 2 DRY: refactoring in DSL code is much easier 3 Start-up costs manageable Quality: 1 DSL Type checker guarantees correctness of dynamic constructions (and there’s much of that in Java web frameworks!) 2 Typed, explicit dataflow between pages 3 Concrete example: guaranteed prevention of cross-site scripting Center for Software Technology Sander Mak
  • 50. Developing Interacting Domain Specific Languages > Reflection Drawbacks of our approach Every semantic check must be written from scratch For each DSL Type checking, resolving symbolic references, and so on Fortunately, we can get very specific with our checks and associated messages Center for Software Technology Sander Mak
  • 51. Developing Interacting Domain Specific Languages > Reflection Drawbacks of our approach Every semantic check must be written from scratch For each DSL Type checking, resolving symbolic references, and so on Fortunately, we can get very specific with our checks and associated messages Module system must be written from scratch This might be solved generically (parameterizing over interface definitions), though we have not researched this Center for Software Technology Sander Mak
  • 52. Developing Interacting Domain Specific Languages > Reflection Drawbacks of our approach Every semantic check must be written from scratch For each DSL Type checking, resolving symbolic references, and so on Fortunately, we can get very specific with our checks and associated messages Module system must be written from scratch This might be solved generically (parameterizing over interface definitions), though we have not researched this What are the semantics of our DSLs? Center for Software Technology Sander Mak
  • 53. Developing Interacting Domain Specific Languages > Reflection Alternative approaches Embedded DSLs Asynchronous, runtime linking of generated code (independent code generation) Larger role for the IDE Long-term: active libraries and a universal language Center for Software Technology Sander Mak
  • 54. Developing Interacting Domain Specific Languages > Reflection Alternative approaches Embedded DSLs Asynchronous, runtime linking of generated code (independent code generation) Larger role for the IDE Long-term: active libraries and a universal language Realistically, this probably never happens Center for Software Technology Sander Mak
  • 55. Developing Interacting Domain Specific Languages > Conclusion Demonstration Center for Software Technology Sander Mak
  • 56. Developing Interacting Domain Specific Languages > Conclusion Topics not discussed ... but interesting nevertheless Actual implementation details of compilers 1 Implemented using Stratego/XT toolkit BusinessRules interface definition 2 To overcome limitations of WebLayer action language in multiple DSL style Interaction with GPL code 3 Necessary for real-world adoptation, but how to implement it? Much more context and related work 4 ... my thesis will be available shortly Center for Software Technology Sander Mak
  • 57. Developing Interacting Domain Specific Languages > Conclusion Concluding remarks Interacting DSLs indeed feasible Especially suited for layered architectures (like web-applications) DSLs encode principled usage of frameworks and framework interaction Interaction implemented through interface files Separate compilation allows for reuse of DSLs Implicit interface may be a limiting factor DSLs for technical domains are a serious option for a company to pursue, with demonstrated advantages, but also requiring considerable effort. Center for Software Technology Sander Mak