CPColin / ceylon-spring-experiments

Experimenting with using Spring Boot from Ceylon
2 stars 0 forks source link

ceylon-spring-experiments

Let's smush Ceylon, Spring Boot, and Thymeleaf together and see what happens!

Run the demo::run function to fire up a server on localhost:8080 and experiment with the simple CRUD webapp. Log in as admin1 or admin2 to get elevated privileges or anybody between user1 and user5 to get normal privileges.

Fun stuff

Less fun stuff

Important configuration options

See .ceylon/config for important configuration options, notably:

Thymeleaf

You can find the Thymeleaf templates in the resource/demo/ROOT/templates/fragments directory. They use an unusual, inside-out layout pattern I like, where, instead of having to keep the page structure consistent between templates, having to remember to include the header and footer fragments, etc., templates pass themselves to the Layout fragment, which turns around and inserts the content where it needs to go. The Layout.js script handles jumping through the right hoops to keep such templates looking natural. If you're using Chrome, please see the note in that file, because you'll need a certain command-line option in order for this trick to work.

Inspirations

Thanks to the following for inspiring this experiment and providing example code that helped me figure out how this stuff fits together:

License

Public domain! Go nuts!