Skip to content

Commit

Permalink
Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
hpehl committed Mar 5, 2024
1 parent d1b33bf commit 78c85a3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
Elemento now contains a very basic place manager. The place manager is minimal invasive and built around a few simple concepts:

- `Route`: Annotation that can be used to decorate pages. An annotation processor collects all classes annotated with `@Route` and generates an implementation of `Routes`.
- `Routes`: Provides a collection of places and their corresponding pages.
- `Place`: Class that represents a place in an application. A place is identified by a route, and can have an optional title and a custom root element.
- `Routes`: Provides a map of places and their corresponding pages.
- `Place`: Data class that represents a place in an application. A place is identified by a route, and can have an optional title and a custom root element.
- `Page`: Interface that represents a collection of HTML elements.
- `PlaceManager`: Class responsible for managing the routing and navigation within an application.

Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Elemento simplifies working with GWT [Elemental2](https://github.com/google/elem
* [SVG & MathML](#svg--mathml)
* [SVG](#svg)
* [MathML](#mathml)
* [Router](#router)
* [Samples](#samples)
* [Contributing](#contributing)
* [Get Help](#get-help)
Expand Down Expand Up @@ -357,6 +358,20 @@ In your GWT module inherit from `org.jboss.elemento.MathML`:

Finally, use the static methods in `org.jboss.elemento.mathml.MathML` to create MathML elements.

# Router

Elemento offers a very basic router. The router is minimal invasive and built around a few simple concepts:

- `Route`: Annotation that can be used to decorate pages. An annotation processor collects all classes annotated with `@Route` and generates an implementation of `Routes`.
- `Routes`: Provides a map of places and their corresponding pages.
- `Place`: Data class that represents a place in an application. A place is identified by a route, and can have an optional title and a custom root element.
- `Page`: Interface that represents a collection of HTML elements.
- `PlaceManager`: Class responsible for managing the routing and navigation within an application.

## Place manager

The place manager is the central part of the router module. It offers builder like methods to configure the place manager and a `start()` method to show the initial page.

# Samples

Elemento comes with different [implementations](https://github.com/hal/elemento-samples) of the [TodoMVC](http://todomvc.com/) application using different frameworks:
Expand Down

0 comments on commit 78c85a3

Please sign in to comment.