Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

13.3. Thinking in tongues

The next step to take is to build a DSL that would integrate with the design of our Shopping-Cart DSL. That DSL will be a rule engine, which is almost the default starting place for DSLs because they’re the easiest to build. I have a default syntax and approach for such rule engines, as shown in listing 13.1.

Listing 13.1. Default syntax for a rule engine

when [some business condition]:
    [some action]
    [another action]


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint