SlideShare a Scribd company logo
Developing Interacting Domain Speciļ¬c Languages




        Developing Interacting Domain Speciļ¬c 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 Speciļ¬c Languages > Introduction


 Outline


        Introduction
    1


        DomainModel
    2


        WebLayer
    3


        Interaction
    4


        Reļ¬‚ection
    5


        Conclusion
    6




                                 Center for Software Technology   Sander Mak
Developing Interacting Domain Speciļ¬c Languages > Introduction


 Domain Speciļ¬c Language




                                                                  Increased productivity
                                                                  Increased quality
                                  Advantages:
                                                                  Clarity by abstraction

                                 Center for Software Technology                            Sander Mak
Developing Interacting Domain Speciļ¬c Languages > Introduction


 Languages?

 Why the plural, i.e. DSLs




                                 Center for Software Technology   Sander Mak
Developing Interacting Domain Speciļ¬c Languages > Introduction


 Languages?

 Why the plural, i.e. DSLs
         One-size ļ¬ts 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 Speciļ¬c Languages > Introduction


 Languages?

 Why the plural, i.e. DSLs
         One-size ļ¬ts 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 Speciļ¬c Languages > Introduction


 Languages?

 Why the plural, i.e. DSLs
           One-size ļ¬ts 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 Speciļ¬c 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 speciļ¬c to a domain




    Diļ¬€erent compilers, one goal: build a complete Java based web-app
                                 Center for Software Technology               Sander Mak
Developing Interacting Domain Speciļ¬c 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 speciļ¬c errors




                                 Center for Software Technology                  Sander Mak
Developing Interacting Domain Speciļ¬c 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 speciļ¬c 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 Speciļ¬c Languages > Introduction


 Goals

    Why create DSLs for these domains:
      Intended use
        Increase productivity
      To create data-intensive web-applications, focus on conļ¬nes 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 speciļ¬c 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 Speciļ¬c Languages > DomainModel


 DomainModel language


   Language for deļ¬ning persistent domain (or data) models

   Essential features:


           Concise deļ¬nition of concepts (entities)
           Generates JPA implementation (standardized library)
           Encodes domain speciļ¬c technical knowledge (e.g. object identity)
           Allows for domain speciļ¬c semantic checking
           May be used in combination with diļ¬€erent DSLs




                                Center for Software Technology          Sander Mak
Developing Interacting Domain Speciļ¬c Languages > DomainModel


 Concept deļ¬nition

   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 Speciļ¬c Languages > DomainModel


 Concept deļ¬nition

   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 Speciļ¬c Languages > DomainModel


 Concept deļ¬nition

   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 Speciļ¬c Languages > DomainModel


 Concept deļ¬nition

   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 Speciļ¬c Languages > DomainModel


 Concept deļ¬nition

   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 Speciļ¬c Languages > DomainModel


 Concept deļ¬nition

   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 Speciļ¬c Languages > DomainModel


 Concept deļ¬nition

   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 Speciļ¬c Languages > DomainModel


 Concept deļ¬nition

   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 Speciļ¬c Languages > DomainModel


 Concept deļ¬nition

   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 Speciļ¬c Languages > DomainModel


 Concept deļ¬nition

   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 Speciļ¬c Languages > DomainModel


 Concept deļ¬nition

   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 Speciļ¬c Languages > DomainModel


 Concept deļ¬nition

   concept BlogEntry {
     title        :: String (name, required)
     abstract :: String
       Compiling a DomainModel concept
     contents :: String (required)
       Deļ¬nition -> 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 Speciļ¬c Languages > DomainModel


 Concept deļ¬nition

   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 Speciļ¬c Languages > WebLayer


 WebLayer language


   Language for deļ¬ning pages (views) in web-app

   Essential features:


           Works seamlessly with DomainModel deļ¬nitions
           Abstracts away from the Seam framework and Java intricacies
           Strongly typed
           Explicit, checked data-ļ¬‚ow between pages
           Generic constructs




                                Center for Software Technology           Sander Mak
Developing Interacting Domain Speciļ¬c Languages > WebLayer


 WebLayer compiler




                                Center for Software Technology   Sander Mak
Developing Interacting Domain Speciļ¬c Languages > WebLayer


 Page deļ¬nition

   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 Speciļ¬c Languages > WebLayer


 Page deļ¬nition

   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 Speciļ¬c Languages > WebLayer


 Page deļ¬nition

   page ViewBlog(BlogEntry be, User u){
    Multiple page deļ¬nitions in one ļ¬le, 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 Speciļ¬c Languages > WebLayer


 Page deļ¬nition

   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 Speciļ¬c Languages > WebLayer


 Page deļ¬nition

   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 Speciļ¬c Languages > WebLayer


 Page deļ¬nition

   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 Speciļ¬c Languages > WebLayer


 Page deļ¬nition

   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 Speciļ¬c Languages > WebLayer


 Page deļ¬nition

   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 Speciļ¬c Languages > WebLayer


 Page deļ¬nition

   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 Speciļ¬c Languages > WebLayer


 Page deļ¬nition

   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 Speciļ¬c Languages > WebLayer


 Issues


           Layout is more or less ļ¬xed
                  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
                  speciļ¬c
           Editing lists
                  Our solution is speciļ¬c and ad-hoc
           Action language
                  Why not, for example, embed Java?




                                Center for Software Technology                   Sander Mak
Developing Interacting Domain Speciļ¬c 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 Speciļ¬c 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 ļ¬les.


                                 Center for Software Technology   Sander Mak
Developing Interacting Domain Speciļ¬c 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 ļ¬les.


                                 Center for Software Technology   Sander Mak
Developing Interacting Domain Speciļ¬c Languages > Interaction


 Interface ļ¬les
    DSL compiler emits interface ļ¬le. 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 Speciļ¬c Languages > Interaction


 Interface ļ¬les
    DSL compiler emits interface ļ¬le. 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 ļ¬le mechanism is as cache for compiler
           operations



                                 Center for Software Technology         Sander Mak
Developing Interacting Domain Speciļ¬c Languages > Interaction


 Interface ļ¬les
    DSL compiler emits interface ļ¬le. 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 ļ¬le mechanism is as cache for compiler
           operations



                                 Center for Software Technology         Sander Mak
Developing Interacting Domain Speciļ¬c Languages > Interaction


 Interface ļ¬les
    DSL compiler emits interface ļ¬le. 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 ļ¬le 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 Speciļ¬c Languages > Reļ¬‚ection


 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 Speciļ¬c Languages > Reļ¬‚ection


 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 Speciļ¬c Languages > Reļ¬‚ection


 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 Speciļ¬c Languages > Reļ¬‚ection


 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 dataļ¬‚ow between pages

      3 Concrete example: guaranteed prevention of cross-site scripting

                                 Center for Software Technology                           Sander Mak
Developing Interacting Domain Speciļ¬c Languages > Reļ¬‚ection


 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 speciļ¬c with our checks and
           associated messages




                                 Center for Software Technology       Sander Mak
Developing Interacting Domain Speciļ¬c Languages > Reļ¬‚ection


 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 speciļ¬c with our checks and
           associated messages

    Module system must be written from scratch
           This might be solved generically (parameterizing over interface
           deļ¬nitions), though we have not researched this




                                 Center for Software Technology              Sander Mak
Developing Interacting Domain Speciļ¬c Languages > Reļ¬‚ection


 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 speciļ¬c with our checks and
           associated messages

    Module system must be written from scratch
           This might be solved generically (parameterizing over interface
           deļ¬nitions), though we have not researched this

    What are the semantics of our DSLs?


                                 Center for Software Technology              Sander Mak
Developing Interacting Domain Speciļ¬c Languages > Reļ¬‚ection


 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 Speciļ¬c Languages > Reļ¬‚ection


 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 Speciļ¬c Languages > Conclusion


 Demonstration




                                 Center for Software Technology   Sander Mak
Developing Interacting Domain Speciļ¬c Languages > Conclusion


 Topics not discussed
              ... but interesting nevertheless



           Actual implementation details of compilers
       1

                  Implemented using Stratego/XT toolkit
           BusinessRules interface deļ¬nition
       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 Speciļ¬c 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 ļ¬les
                  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
    eļ¬€ort.



                                 Center for Software Technology                     Sander Mak

More Related Content

What's hot

DishitJoshi_CV
DishitJoshi_CVDishitJoshi_CV
DishitJoshi_CV
Dishit Joshi
Ā 
JelitaAsianCV
JelitaAsianCVJelitaAsianCV
JelitaAsianCV
Jelita Asian
Ā 
Docfacto release 2.4
Docfacto release 2.4Docfacto release 2.4
Docfacto release 2.4
Darren Hudson
Ā 
Mohamed el abacy
Mohamed el abacyMohamed el abacy
Mohamed el abacy
Mohamed Abacy
Ā 
Alms analysis presentation
Alms analysis presentationAlms analysis presentation
Alms analysis presentation
OpenEdBlogger
Ā 
UnnivmNew
UnnivmNewUnnivmNew
UnnivmNew
Unni Mana
Ā 
Bikram kishor rout
Bikram kishor routBikram kishor rout
Bikram kishor rout
Bikram Rout
Ā 
DinakaraPandian_9+
DinakaraPandian_9+DinakaraPandian_9+
DinakaraPandian_9+
Dinakara Pandian
Ā 
Training report anish
Training report anishTraining report anish
Training report anish
Anish Yadav
Ā 
Madhurima_Resume
Madhurima_ResumeMadhurima_Resume
Madhurima_Resume
Madhurima Das
Ā 
V.S.VamsiKrishna
V.S.VamsiKrishnaV.S.VamsiKrishna
V.S.VamsiKrishna
vamsisvk
Ā 
BALAJI K _Resume
BALAJI K _ResumeBALAJI K _Resume
BALAJI K _Resume
Balaji K
Ā 
Psi multi accessgateway_casestudy
Psi multi accessgateway_casestudyPsi multi accessgateway_casestudy
Psi multi accessgateway_casestudy
Primesoftinc
Ā 
Model-Driven Software Development
Model-Driven Software DevelopmentModel-Driven Software Development
Model-Driven Software Development
elliando dias
Ā 
Dave 3 presentation
Dave 3 presentationDave 3 presentation
Dave 3 presentation
Infineon Microcontroller
Ā 
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
Sander Hoogendoorn
Ā 
Project P erts2012
Project P erts2012Project P erts2012
Project P erts2012
AdaCore
Ā 
RTF - Prasad bhatt
RTF - Prasad bhattRTF - Prasad bhatt
RTF - Prasad bhatt
Roopa Nadkarni
Ā 
Siva_CV_2016
Siva_CV_2016Siva_CV_2016
Siva_CV_2016
siva srinivas
Ā 
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
Remedy IT
Ā 

What's hot (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
Ā 

Viewers also liked

ä¹ę–¹äø­ę–‡č¼øå…„ę³• ē‰¹å¾µē°”介
ä¹ę–¹äø­ę–‡č¼øå…„ę³• ē‰¹å¾µē°”ä»‹ä¹ę–¹äø­ę–‡č¼øå…„ę³• ē‰¹å¾µē°”介
ä¹ę–¹äø­ę–‡č¼øå…„ę³• ē‰¹å¾µē°”介Warren Yip
Ā 
Unenclosable
UnenclosableUnenclosable
Unenclosable
AlanRosenblith
Ā 
Vip Program by Proforma Amplified
Vip Program by Proforma AmplifiedVip Program by Proforma Amplified
Vip Program by Proforma Amplified
Jim 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
Ā 
Unenclosable
UnenclosableUnenclosable
Unenclosable
AlanRosenblith
Ā 
2009ęˆęžœå±•-åÆ¦ę³å ±å°Ž
2009ęˆęžœå±•-åÆ¦ę³å ±å°Ž2009ęˆęžœå±•-åÆ¦ę³å ±å°Ž
2009ęˆęžœå±•-åÆ¦ę³å ±å°Ž
é–‹ę”¾å¼ę¦‚åæµē™¼č”Øå¹³č‡ŗ
Ā 
Kommunikationsplanering
KommunikationsplaneringKommunikationsplanering
KommunikationsplaneringKlimatkommunerna
Ā 
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
Enthiosys Inc
Ā 
West E Port
West E PortWest E Port
Four Pillars Zone
Four Pillars ZoneFour Pillars Zone
Four Pillars Zone
Carol 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 Analysis
Davide Ceolin
Ā 
Proforma Branded Apps
Proforma Branded AppsProforma Branded Apps
Proforma Branded Apps
Jim Hanika
Ā 
Contextual Discovery in Business Intelligence
Contextual Discovery in Business IntelligenceContextual Discovery in Business Intelligence
Contextual Discovery in Business Intelligence
www.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
Ā 
ꇉē”Øå¾®ę©Ÿé›»ę„Ÿęø¬ē§‘ꊀ開ē™¼ęœŖ來ę™ŗꅧē”Ÿę“»ē”¢å“
ꇉē”Øå¾®ę©Ÿé›»ę„Ÿęø¬ē§‘ꊀ開ē™¼ęœŖ來ę™ŗꅧē”Ÿę“»ē”¢å“ę‡‰ē”Øå¾®ę©Ÿé›»ę„Ÿęø¬ē§‘ꊀ開ē™¼ęœŖ來ę™ŗꅧē”Ÿę“»ē”¢å“
ꇉē”Øå¾®ę©Ÿé›»ę„Ÿęø¬ē§‘ꊀ開ē™¼ęœŖ來ę™ŗꅧē”Ÿę“»ē”¢å“
é–‹ę”¾å¼ę¦‚åæµē™¼č”Øå¹³č‡ŗ
Ā 
MetaCurrency1rough
MetaCurrency1roughMetaCurrency1rough
MetaCurrency1rough
AlanRosenblith
Ā 
08 necto working_with_kpi_ready
08 necto working_with_kpi_ready08 necto working_with_kpi_ready
08 necto working_with_kpi_ready
www.panorama.com
Ā 

Viewers also liked (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
Ā 

Similar to Interacting Domain Specific Languages

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
ESUG
Ā 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
Harsh Jegadeesan
Ā 
Model Driven Architectures
Model Driven ArchitecturesModel Driven Architectures
Model Driven Architectures
Lalit Kale
Ā 
Domain specific modelling (DSM)
Domain specific modelling (DSM)Domain specific modelling (DSM)
Domain specific modelling (DSM)
PG Scholar
Ā 
Ravindra Prasad
Ravindra PrasadRavindra Prasad
Ravindra Prasad
Ravindra Prasad
Ā 
Language Engineering With Xtext
Language Engineering With XtextLanguage Engineering With Xtext
Language Engineering With Xtext
Sven Efftinge
Ā 
Comparative Study of programming Languages
Comparative Study of programming LanguagesComparative Study of programming Languages
Comparative Study of programming Languages
Ishan 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 presentation
streambase
Ā 
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
allanchao
Ā 
Introduction to Domain-Driven Design
Introduction to Domain-Driven DesignIntroduction to Domain-Driven Design
Introduction to Domain-Driven Design
R-P-Azevedo
Ā 
Sudhir_Resume
Sudhir_ResumeSudhir_Resume
Sudhir_Resume
Sudhir Srivastava
Ā 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
Lalit Kale
Ā 
Mahesh_webMethodsProfile
Mahesh_webMethodsProfileMahesh_webMethodsProfile
Mahesh_webMethodsProfile
mahesh meesala
Ā 
Sudhir srivastava profile
Sudhir srivastava profileSudhir srivastava profile
Sudhir srivastava profile
Sudhir Srivastava
Ā 
Mohamed Aashik Ali.A_original - USA
Mohamed Aashik Ali.A_original - USAMohamed Aashik Ali.A_original - USA
Mohamed Aashik Ali.A_original - USA
Mohamed Ali
Ā 
SAIGANESH CHINTALA_JAVA
SAIGANESH CHINTALA_JAVASAIGANESH CHINTALA_JAVA
SAIGANESH CHINTALA_JAVA
SAIGANESH CHINTALA
Ā 
Cv 7830388-81894-rizwan-farooq
Cv 7830388-81894-rizwan-farooqCv 7830388-81894-rizwan-farooq
Cv 7830388-81894-rizwan-farooq
Rizwan Farooq
Ā 
Vsts intro
Vsts introVsts intro
Vsts intro
Sevajothi Crafts
Ā 
Resume
ResumeResume
Dipalee Shah Resume
Dipalee Shah ResumeDipalee Shah Resume
Dipalee Shah Resume
Dipalee Shah
Ā 

Similar to Interacting Domain Specific Languages (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
Ā 

More from Sander Mak (@Sander_Mak)

Scalable Application Development @ Picnic
Scalable Application Development @ PicnicScalable Application Development @ Picnic
Scalable Application Development @ Picnic
Sander Mak (@Sander_Mak)
Ā 
Coding Your Way to Java 13
Coding Your Way to Java 13Coding Your Way to Java 13
Coding Your Way to Java 13
Sander Mak (@Sander_Mak)
Ā 
Coding Your Way to Java 12
Coding Your Way to Java 12Coding Your Way to Java 12
Coding Your Way to Java 12
Sander Mak (@Sander_Mak)
Ā 
Java Modularity: the Year After
Java Modularity: the Year AfterJava Modularity: the Year After
Java Modularity: the Year After
Sander Mak (@Sander_Mak)
Ā 
Desiging for Modularity with Java 9
Desiging for Modularity with Java 9Desiging for Modularity with Java 9
Desiging for Modularity with Java 9
Sander Mak (@Sander_Mak)
Ā 
Modules or microservices?
Modules or microservices?Modules or microservices?
Modules or microservices?
Sander Mak (@Sander_Mak)
Ā 
Migrating to Java 9 Modules
Migrating to Java 9 ModulesMigrating to Java 9 Modules
Migrating to Java 9 Modules
Sander Mak (@Sander_Mak)
Ā 
Java 9 Modularity in Action
Java 9 Modularity in ActionJava 9 Modularity in Action
Java 9 Modularity in Action
Sander Mak (@Sander_Mak)
Ā 
Java modularity: life after Java 9
Java modularity: life after Java 9Java modularity: life after Java 9
Java modularity: life after Java 9
Sander Mak (@Sander_Mak)
Ā 
Provisioning the IoT
Provisioning the IoTProvisioning the IoT
Provisioning the IoT
Sander Mak (@Sander_Mak)
Ā 
Event-sourced architectures with Akka
Event-sourced architectures with AkkaEvent-sourced architectures with Akka
Event-sourced architectures with Akka
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 pain
Sander 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)
Ā 
Modular JavaScript
Modular JavaScriptModular JavaScript
Modular JavaScript
Sander Mak (@Sander_Mak)
Ā 
Modularity in the Cloud
Modularity in the CloudModularity in the Cloud
Modularity in the Cloud
Sander Mak (@Sander_Mak)
Ā 
Scala & Lift (JEEConf 2012)
Scala & Lift (JEEConf 2012)Scala & Lift (JEEConf 2012)
Scala & Lift (JEEConf 2012)
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)
Ā 
Akka (BeJUG)
Akka (BeJUG)Akka (BeJUG)
Akka (BeJUG)
Sander Mak (@Sander_Mak)
Ā 
Fork Join (BeJUG 2012)
Fork Join (BeJUG 2012)Fork Join (BeJUG 2012)
Fork Join (BeJUG 2012)
Sander Mak (@Sander_Mak)
Ā 
Fork/Join for Fun and Profit!
Fork/Join for Fun and Profit!Fork/Join for Fun and Profit!
Fork/Join for Fun and Profit!
Sander Mak (@Sander_Mak)
Ā 

More from 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!
Ā 

Recently uploaded

Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
Dinusha Kumarasiri
Ā 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
Intelisync
Ā 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
Ā 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
Ā 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
Hiike
Ā 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
Ā 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Precisely
Ā 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
Ā 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
Ā 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
Ā 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
Ā 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
Ā 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
Ā 
FREE A4 Cyber Security Awareness Posters-Social Engineering part 3
FREE A4 Cyber Security Awareness  Posters-Social Engineering part 3FREE A4 Cyber Security Awareness  Posters-Social Engineering part 3
FREE A4 Cyber Security Awareness Posters-Social Engineering part 3
Data Hops
Ā 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
Ā 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
Ā 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
Ā 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
Ā 
Public CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptxPublic CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptx
marufrahmanstratejm
Ā 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
Ā 

Recently uploaded (20)

Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
Ā 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
Ā 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Ā 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ā 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
Ā 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Ā 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Ā 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Ā 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Ā 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Ā 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
Ā 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Ā 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Ā 
FREE A4 Cyber Security Awareness Posters-Social Engineering part 3
FREE A4 Cyber Security Awareness  Posters-Social Engineering part 3FREE A4 Cyber Security Awareness  Posters-Social Engineering part 3
FREE A4 Cyber Security Awareness Posters-Social Engineering part 3
Ā 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Ā 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
Ā 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Ā 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
Ā 
Public CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptxPublic CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptx
Ā 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Ā 

Interacting Domain Specific Languages

  • 1. Developing Interacting Domain Speciļ¬c Languages Developing Interacting Domain Speciļ¬c 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 Speciļ¬c Languages > Introduction Outline Introduction 1 DomainModel 2 WebLayer 3 Interaction 4 Reļ¬‚ection 5 Conclusion 6 Center for Software Technology Sander Mak
  • 3. Developing Interacting Domain Speciļ¬c Languages > Introduction Domain Speciļ¬c Language Increased productivity Increased quality Advantages: Clarity by abstraction Center for Software Technology Sander Mak
  • 4. Developing Interacting Domain Speciļ¬c Languages > Introduction Languages? Why the plural, i.e. DSLs Center for Software Technology Sander Mak
  • 5. Developing Interacting Domain Speciļ¬c Languages > Introduction Languages? Why the plural, i.e. DSLs One-size ļ¬ts 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 Speciļ¬c Languages > Introduction Languages? Why the plural, i.e. DSLs One-size ļ¬ts 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 Speciļ¬c Languages > Introduction Languages? Why the plural, i.e. DSLs One-size ļ¬ts 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 Speciļ¬c 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 speciļ¬c to a domain Diļ¬€erent compilers, one goal: build a complete Java based web-app Center for Software Technology Sander Mak
  • 9. Developing Interacting Domain Speciļ¬c 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 speciļ¬c errors Center for Software Technology Sander Mak
  • 10. Developing Interacting Domain Speciļ¬c 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 speciļ¬c 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 Speciļ¬c Languages > Introduction Goals Why create DSLs for these domains: Intended use Increase productivity To create data-intensive web-applications, focus on conļ¬nes 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 speciļ¬c 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 Speciļ¬c Languages > DomainModel DomainModel language Language for deļ¬ning persistent domain (or data) models Essential features: Concise deļ¬nition of concepts (entities) Generates JPA implementation (standardized library) Encodes domain speciļ¬c technical knowledge (e.g. object identity) Allows for domain speciļ¬c semantic checking May be used in combination with diļ¬€erent DSLs Center for Software Technology Sander Mak
  • 13. Developing Interacting Domain Speciļ¬c Languages > DomainModel Concept deļ¬nition 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 Speciļ¬c Languages > DomainModel Concept deļ¬nition 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 Speciļ¬c Languages > DomainModel Concept deļ¬nition 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 Speciļ¬c Languages > DomainModel Concept deļ¬nition 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 Speciļ¬c Languages > DomainModel Concept deļ¬nition 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 Speciļ¬c Languages > DomainModel Concept deļ¬nition 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 Speciļ¬c Languages > DomainModel Concept deļ¬nition 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 Speciļ¬c Languages > DomainModel Concept deļ¬nition 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 Speciļ¬c Languages > DomainModel Concept deļ¬nition 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 Speciļ¬c Languages > DomainModel Concept deļ¬nition 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 Speciļ¬c Languages > DomainModel Concept deļ¬nition 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 Speciļ¬c Languages > DomainModel Concept deļ¬nition concept BlogEntry { title :: String (name, required) abstract :: String Compiling a DomainModel concept contents :: String (required) Deļ¬nition -> 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 Speciļ¬c Languages > DomainModel Concept deļ¬nition 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 Speciļ¬c Languages > WebLayer WebLayer language Language for deļ¬ning pages (views) in web-app Essential features: Works seamlessly with DomainModel deļ¬nitions Abstracts away from the Seam framework and Java intricacies Strongly typed Explicit, checked data-ļ¬‚ow between pages Generic constructs Center for Software Technology Sander Mak
  • 27. Developing Interacting Domain Speciļ¬c Languages > WebLayer WebLayer compiler Center for Software Technology Sander Mak
  • 28. Developing Interacting Domain Speciļ¬c Languages > WebLayer Page deļ¬nition 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 Speciļ¬c Languages > WebLayer Page deļ¬nition 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 Speciļ¬c Languages > WebLayer Page deļ¬nition page ViewBlog(BlogEntry be, User u){ Multiple page deļ¬nitions in one ļ¬le, 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 Speciļ¬c Languages > WebLayer Page deļ¬nition 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 Speciļ¬c Languages > WebLayer Page deļ¬nition 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 Speciļ¬c Languages > WebLayer Page deļ¬nition 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 Speciļ¬c Languages > WebLayer Page deļ¬nition 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 Speciļ¬c Languages > WebLayer Page deļ¬nition 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 Speciļ¬c Languages > WebLayer Page deļ¬nition 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 Speciļ¬c Languages > WebLayer Page deļ¬nition 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 Speciļ¬c Languages > WebLayer Issues Layout is more or less ļ¬xed 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 speciļ¬c Editing lists Our solution is speciļ¬c and ad-hoc Action language Why not, for example, embed Java? Center for Software Technology Sander Mak
  • 39. Developing Interacting Domain Speciļ¬c 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 Speciļ¬c 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 ļ¬les. Center for Software Technology Sander Mak
  • 41. Developing Interacting Domain Speciļ¬c 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 ļ¬les. Center for Software Technology Sander Mak
  • 42. Developing Interacting Domain Speciļ¬c Languages > Interaction Interface ļ¬les DSL compiler emits interface ļ¬le. 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 Speciļ¬c Languages > Interaction Interface ļ¬les DSL compiler emits interface ļ¬le. 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 ļ¬le mechanism is as cache for compiler operations Center for Software Technology Sander Mak
  • 44. Developing Interacting Domain Speciļ¬c Languages > Interaction Interface ļ¬les DSL compiler emits interface ļ¬le. 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 ļ¬le mechanism is as cache for compiler operations Center for Software Technology Sander Mak
  • 45. Developing Interacting Domain Speciļ¬c Languages > Interaction Interface ļ¬les DSL compiler emits interface ļ¬le. 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 ļ¬le 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 Speciļ¬c Languages > Reļ¬‚ection 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 Speciļ¬c Languages > Reļ¬‚ection 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 Speciļ¬c Languages > Reļ¬‚ection 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 Speciļ¬c Languages > Reļ¬‚ection 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 dataļ¬‚ow between pages 3 Concrete example: guaranteed prevention of cross-site scripting Center for Software Technology Sander Mak
  • 50. Developing Interacting Domain Speciļ¬c Languages > Reļ¬‚ection 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 speciļ¬c with our checks and associated messages Center for Software Technology Sander Mak
  • 51. Developing Interacting Domain Speciļ¬c Languages > Reļ¬‚ection 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 speciļ¬c with our checks and associated messages Module system must be written from scratch This might be solved generically (parameterizing over interface deļ¬nitions), though we have not researched this Center for Software Technology Sander Mak
  • 52. Developing Interacting Domain Speciļ¬c Languages > Reļ¬‚ection 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 speciļ¬c with our checks and associated messages Module system must be written from scratch This might be solved generically (parameterizing over interface deļ¬nitions), though we have not researched this What are the semantics of our DSLs? Center for Software Technology Sander Mak
  • 53. Developing Interacting Domain Speciļ¬c Languages > Reļ¬‚ection 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 Speciļ¬c Languages > Reļ¬‚ection 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 Speciļ¬c Languages > Conclusion Demonstration Center for Software Technology Sander Mak
  • 56. Developing Interacting Domain Speciļ¬c Languages > Conclusion Topics not discussed ... but interesting nevertheless Actual implementation details of compilers 1 Implemented using Stratego/XT toolkit BusinessRules interface deļ¬nition 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 Speciļ¬c 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 ļ¬les 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 eļ¬€ort. Center for Software Technology Sander Mak