commit | 2dab8e0ad16c1ad690e08f9eb76fe2a42b187b3d | [log] [tgz] |
---|---|---|
author | Benjamin Weidig <ben@netzgut.net> | Tue Jul 28 08:03:24 2020 +0200 |
committer | Thiago H. de Paula Figueiredo <thiago@arsmachina.com.br> | Sat Oct 03 11:47:54 2020 -0300 |
tree | b6b88a94dd6b9b3f16224e812be0dca0a59a7eec | |
parent | 0c3ef11869225c2a8c3970404af20f9c34aa9f73 [diff] |
TAP5-2640: tapestry-json improvements (implement Collection/Map, better exceptions) tapestry-json: added JSONTypeMismatchException Added JSONTypeMismatchException and JSONValueNotFoundException. JSONObject behaviour improved by using opt() isntead of get for mor specific types, so we can actually use the new exceptions. tapestry-json: JSONArray get() now throws IndexOutOfBoundsException There's no reason to repackage the original exception into a RuntimeException. tapestry-json: JSONTokener constructors exceptions improved tapestry-json: improve JSONSpec tests tapestry-json: better exception building tapestry-json: added JSONSyntaxException tapesty-json: javadoc updated tapestry-json: JSONArray non-finite/nan check fixed The constructor wasn't using checkedPut, even though the javadoc states that doubles are checked. tapestry-json: javadoc typo tapestry-json: added JSONArrayIndexOutOfBoundsException tapestry-json: code style tapestrsy-json: fix lossy conversion tapestry-json: source formatting tapestry-json: throw IllegalArgumentException on invalid doubles tapestry-json: JSONObject implements Map<String, Object> To provide better interoperability with Java collections the JSONObject type now implements Map<String, Object>. The needed changes are marginal: - putAll -> now returns void (breaking change) - Arguments for key are Object -> shouldn't be a problem tapestry-json: added get{type}OrDefault methods to JSONObject tapestry-json: make JSONArray a "real" Collection (wip) tapestry-json: JSONArray improve javadoc tapestry-json: JSONObject improve javadoc
Tapestry is a component-oriented Java web app framework focusing on performance and developer productivity.
A component is just a reusable part of a page. It's trivially easy to create your own components, and Tapestry comes with a large number of components you can use (Form, Loop, Select, Checkbox, Grid, BeanEditor, etc.).
In Tapestry, each page and component is a simple Java POJO with a corresponding HTML template. The HTML template and corresponding Java class have the same name (e.g. “Breadcrumbs.html” and “Breadcrumbs.java”), so you don‘t have to tell Tapestry which template uses which Java class. It’s automatic.
Tapestry features live class reloading: change your Java code, refresh the browser and see the changes instantly.
AJAX support allows you to create responsive web interfaces while writing little to no JavaScript. (But if you like writing JavaScript, great, no problem, Tapestry gets out of your way.)
Main article: Getting Started
You can let Apache Maven create your initial project for you:
mvn archetype:generate -DarchetypeCatalog=http://tapestry.apache.org
Maven will prompt you for the archetype to create (“Tapestry 5 Quickstart Project”) and the exact version number (e.g., “5.4.3”). It also asks you for a group id, an artifact id, and a version number. Once Maven dowloads everything, then you can start the app:
$ cd newapp $ mvn jetty:run
Then just send your browser to http://localhost:8080/newapp
See the Getting Started introduction as well as the Tapestry Tutorial for a deeper dive.
See https://tapestry.apache.org/documentation.html for the details on every Tapestry topic.