Index of /courses/cse331/23su/lectures/lec21-servers-code

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory  -  
[   ]lec21-demo.zip2022-08-10 09:51 232K 
[DIR]lec21-demo/2023-08-09 01:57 -  

Lecture Demo Code - Index

Table of Contents

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.

Spark Java

See src/main/java/sparkDemo for the code and comments. Demonstrates the following:

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.)

fetch

See src/main/react/src/App.tsx for the code and comments. Demonstrates the following:

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.)

Anonymous Inner Classes

See src/main/java/anonInnerClassDemo for code. Demonstrates the following:

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.)

Gson

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.)