Groovy for Domain-specific Languages - Second Edition
Integrating It All [ 338 ] In order to create an instance of the game engine class, we use GloovyClassLoader. parseClass to pars ...
Chapter 12 [ 339 ] The example code for this chapter can be found in the TicTacToe directory of the source pack. There are two s ...
Integrating It All [ 340 ] Ideally you want to be able to visualize the code you have just generated. In the above Spock test, y ...
Chapter 12 [ 341 ] dependencies { classpath ( "org.springframework.boot:spring-boot-gradle-plugin:1.2.3.RELEASE" ) classpath ( ' ...
Integrating It All [ 342 ] This starts the server on localhost port 8080 so we can use curl to get a response to the game start ...
Chapter 12 [ 343 ] Integrating with Spring Boot server Spring Boot application startup is via the main method of a class. You ca ...
Integrating It All [ 344 ] Map event(@PathVariable String game, @PathVariable String event, @RequestParam Map params ) { def ses ...
Chapter 12 [ 345 ] The @ResponseBody annotation will mean the result returned by the event action is automatically placed in the ...
Integrating It All [ 346 ] Loading the DSL The transformed DSL classes need to be in the application class path so that the game ...
Chapter 12 [ 347 ] Spring Data mapping for MongoDB In between event requests, we store the latest state of the DSL state variabl ...
Integrating It All [ 348 ] All that remains is for us to declare the GameSession document class, which becomes the data access o ...
Chapter 12 [ 349 ] The footer of the page contains a link, which calls a JavaScript function. This function matches the play_rou ...
Integrating It All [ 350 ] "<div class='vert-separator'></div>", "<h1 class='cell'>{{grid.4}}</h1>", "&l ...
Chapter 12 [ 351 ] The DSL abstracts out a lot of the complexity for the kids. A normal application with a mobile frontend and a ...
http://www.ebook3000.com ...
[ 353 ] Index Symbol @Grab annotation reference 118 A abstract syntax tree. See AST acceptance test-driven development (ATDD) 24 ...
[ 354 ] program logic, using with 155 SAXBuilder 156 SwingBuilder 156 working 176 - 179 BuilderSupport about 255 database builde ...
[ 355 ] D document type definition (DTD) 3 domain-specific language (DSL) about 2 , 3 design 8 evolution of programming language ...
[ 356 ] state machine AST transformation 201 - 207 StateMachineASTTransformation 201 StateMachineBuilder 201 state machine DSL, ...
[ 357 ] Groovy language features about 13 native support, for lists and maps 13 static and optional typing 13 GroovyMarkup about ...
«
11
12
13
14
15
16
17
18
19
20
»
Free download pdf