| Name | Last modified | Size | Description | |
|---|---|---|---|---|
| Parent Directory | - | |||
| lec18-demo/ | 2022-03-01 18:40 | - | ||
| lec18-demo.zip | 2021-03-03 20:52 | 236K | ||
The starter code is available in 2 formats in this directory. lec18-demo is the complete
source tree as a collection of files. lec18-demo.zip contains exactly the same files as
lec18-demo but packaged as a single archive for convenient downloading. Import these files
into IntelliJ to run the demos and experiment with the code.
See src/main/java/sparkDemo for the code and comments. Demonstrates the following:
List)RangeInfo)To start the SparkServer and test it out for yourself, run the runSpark gradle
task. (It's under the "demo" drop-down in the gradle window in IntelliJ.)
See src/main/react/src/App.tsx for the code and comments. Demonstrates the following:
async/await to get the data out of a response.To run the React application and test it our yourself, run npm install (first time only), then
npm start from the src/main/react directory. Remember, the fetch demo makes
requests to the Spark Java server, so you probably want that demo running as well. (See above.)
See src/main/java/anonInnerClassDemo for code. Demonstrates the following:
Comparator (Version 1 from the slides.)Comparator (Version 2 from the slides.)Comparator (Version 3 from the slides.)See the slides for more info. This demo project contains working versions of all the code from the slides.
Use the runStringSortClasses, runStringSortInnerClasses and runStringSortAnonymousInnerClasses
gradle tasks to run these different versions. (They're under the "demo" drop-down in the
gradle window in IntelliJ.)
See src/main/java/gsonDemo for code and comments. Demonstrates the following:
Uses the example from slides. Use the runGson gradle task to run this demo. (It's under
the "demo" drop-down in the gradle window in IntelliJ.)