Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/secretsheppy/ajax-vs-thymeleaf

a comparison program between a pure thymeleaf multi page application and a hybrid thymeleaf ajax (jquery) application.
https://github.com/secretsheppy/ajax-vs-thymeleaf

ajax java javascript jquery spring-boot thymeleaf

Last synced: 7 days ago
JSON representation

a comparison program between a pure thymeleaf multi page application and a hybrid thymeleaf ajax (jquery) application.

Awesome Lists containing this project

README

        

# Ajax (JQuery) vs Pure Thymeleaf

A short program/demo that shows the differences in functionality and implementation between building
a pure thymeleaf multipage application and a hybrid Ajax (JQuery) and thymeleaf application.

This project uses the swing boot java framework, but should be a good illustration as to what the
differences would be in any compatible frameworks.

## Overview

Both versions produce identical pages, on which a list of products stored in the system (as a member
variable `products` of the `Products` class). Each page also allows you to attempt to add a new
product into the system.

## Demo Links

Pure Thymeleaf implementation:
- code [Controller](src/main/java/com/secretsheppy/ajax_vs_thymleaf/controllers/ProductsController.java)
- code [Template](src/main/resources/templates/thymeleaf.html)
- demo [localhost](http://localhost/products/thymeleaf)

Ajax Implementation:
- code [Controller](src/main/java/com/secretsheppy/ajax_vs_thymleaf/controllers/ProductsRestController.java)
- code [Template](src/main/resources/templates/ajax.html)
- code [loading products (javascript)](src/main/resources/static/js/load-products.js)
- code [adding products (javascript)](src/main/resources/static/js/new-product.js)
- demo [localhost](http://localhost/products/ajax)