|
Re: A newcomer: building a web based REST frontend [message #1837778 is a reply to message #1837767] |
Sat, 06 February 2021 07:29 |
|
Hi J D
We use a Scout front end with a REST back end in our own applications too. Basically not much is different from a regular Scout application _with_ a back end.
Take a look at the module "org.eclipse.scout.rt.rest" to start.
A few things are different:
- Instead of the FormData concept to transport data between client/server, you should use IDoEntities (which are basically beans you can serialize/deserialize into JSON)
- For each entity create a XyzRestResourceClient (see IRestResourceClient), it should provide a method for each operation on your REST API. They accept and return DOs (data object) and use JAX RS to make a call to the REST backend.
- Its a good practice to make a XyzForm/PageService for each Form or Page in Scout which reads data from the REST API by calling the XyzRestResourceClient and prepares the data for the UI - and vice versa.
To your other questions:
Yes, you can build dashboards with Eclipse Scout. Here's an example of a (commercial) dashboard built with Scout. Basically it uses the LogicalGridLayout to place Widgets or Fields on a Form. Some of the widgets you see on the screen belong to our CRM and are closed source, others are open source. Like...
The ChartField which integrates Chart JS into the Scout UI.
And yes, you can also use external Java and JavaScript libraries in your Scout project. However, since Eclipse Scout renders a HTML UI in the browser, JavaFX is probably not an option in this case.
Hope that gives you some ideas on where to start.
Cheers,
André
Eclipse Scout Homepage | Documentation | GitHub
|
|
|
Re: A newcomer: building a web based REST frontend [message #1837787 is a reply to message #1837778] |
Sat, 06 February 2021 12:01 |
|
Hi
Some additional information from my side.
If you want to use Charts I have some good news. The upcoming Scout release contains official support for Charts! Until now you had to integrate your favorite chart library by yourself. With Scout 11 you will be able to use the built in Chart widget.
We will officially release Scout 11 in March, but you can already use it (I think the current version is 11.0.3). Please have a look at the release notes for more information: https://eclipsescout.github.io/11.0/release-notes.html#chart
Regarding dashboards: I suggest using the TileGrid (https://scout.bsi-software.com/widgets/?dl=widget-tilefield). You can use the FormFieldTile that wraps a FormField and optimizes the look for dashboards. Or you can add plain tiles with custom content and style.
You should also decide whether you want to use Scout Classic where you use Java for the frontent part, or Scout JS where you use JavaScript. We'll be releasing some new getting started content along with the Scout 11 release in March. Stay tuned!
|
|
|
|
Powered by
FUDForum. Page generated in 0.02961 seconds