Skip to content

Commit

Permalink
Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
hpehl committed Nov 28, 2024
1 parent b5d6fc5 commit fc7c65c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ introduces a common naming pattern for interfaces and classes:
- `HTMLInputElementBuilder`
- `SVGContainerBuilder`

See https://hal-console.gitbook.io/elemento/builder-api#classes-and-interfaces for more information.

### Changed

#### Core
Expand Down
14 changes: 7 additions & 7 deletions docs/builder-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ final HTMLElement footer = footer()

## Classes and Interfaces

The builders returned by the methods in `Elements` are of one of the following classes:
The builders in Elemento are of one of the following classes:

- `HTMLContainerBuilder<E extends HTMLElement>`
- `HTMLElementBuilder<E extends HTMLElement>`
Expand Down Expand Up @@ -106,15 +106,15 @@ manipulate the encapsulated element in a specific way.

The interface names follow the pattern `[HTML|MathML|SVG]Element<Scope>Methods`. Some examples are

- `ElementAttributeMethods`
- `HTMLElementDataMethods`
- `HTMLInputElementMethods`
- `SVGElementStyleMethods`
- [`ElementAttributeMethods`](https://hal.github.io/elemento/apidocs/org/jboss/elemento/HTMLContainerBuilder.html)
- [`HTMLElementDataMethods`](https://hal.github.io/elemento/apidocs/org/jboss/elemento/HTMLElementDataMethods.html)
- [`HTMLInputElementMethods`](https://hal.github.io/elemento/apidocs/org/jboss/elemento/HTMLInputElementMethods.html)
- [`SVGElementStyleMethods`](https://hal.github.io/elemento/apidocs/org/jboss/elemento/SVGElementStyleMethods.html)

If you only use Elemento to create a DOM tree quickly and easily, you will most likely hardly come into touch with the 'method'
If you only use Elemento to create a DOM tree quickly and easily, you will most likely hardly come into touch with the _method_
interfaces. However, if you want to create your own builders, these interfaces come in very handy. You can have very
fine-grained control over which methods your builder should provide. And since these methods are defined as default methods in
interfaces, you are free to mix and match the interfaces across different builders without worrying about multiple inheritance.

The components in [PatternFly Java](https://patternfly-java.github.io/api-design) are a good example of this. They build upon
Elemento's builders and implement specific 'method' interfaces to define their features.
Elemento's builders and implement specific _method_ interfaces to define their features.

0 comments on commit fc7c65c

Please sign in to comment.