-
Couldn't load subscription status.
- Fork 0
Updated tutorial docs for spring integration. #521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, I'd make sure to deep link the heck out of all of this, whether that's to existing webforJ docs pages, or to outside info on Spring, Jakarta, etc.
Make sure that there's some cursory info given when you introduce a new spring concept.
| To get the most out of this tutorial, it’s assumed that you have a basic understanding of Java programming and are familiar with tools like Maven. If you’re new to webforJ, don’t worry - the framework’s fundamentals will be covered along the way. | ||
|
|
||
| The following tools/resources should be present on your development machine | ||
| To get the most out of this tutorial, you should have a basic understanding of Java and Maven. No prior Spring Boot experience is required—key concepts will be introduced as needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps after mentioning that Spring Boot experience isn't overtly necessary, providing some reference material for those interested in the basics would be good.
|
|
||
| To see the app in action at any stage: | ||
|
|
||
| 1) Navigate to the directory for the desired step. This should be the top level directory for that step, containing the `pom.xml` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use consistent 1. or 1) throughout articles
| @Override | ||
| public void run() throws WebforjException { | ||
| // App logic | ||
| @SpringBootApplication |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should have at least a surface level explanation of the @SpringBootApplication annotation
| --- | ||
|
|
||
| ### Adding CSS classes to components {#adding-css-classes-to-components} | ||
| ## 4. Configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Configuration section too brief - needs more Spring Boot, H2 and POM explanation, or at the very least deep linking to the appropriate articles.
| public void run() throws WebforjException { | ||
| // App logic | ||
| @SpringBootApplication | ||
| @StyleSheet("ws://app.css") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps check with Hyyan here, but it may be a good idea to link the assets section here:
https://docs.webforj.com/docs/managing-resources/assets-protocols#the-webserver-protocol
| } | ||
|
|
||
| // Getter... | ||
| public SpringDataRepository<Customer, Long> getFilterableRepository() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The SpringDataRepository wrapper needs more explanation
| @@ -1,33 +1,111 @@ | |||
| --- | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there's some fairly significant duplication here - you start around line 21 talking about routing, and then on line 110 you do the same thing, with similar content. Before I go over the rest of this, perhaps consolidate these two sections so I don't correct any stuff that you planned to remove anyway.
| }); | ||
| context.read(customer); | ||
| } | ||
| public void onDidEnter(DidEnterEvent event, ParametersBag parameters) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ### Binding the fields {#binding-the-fields} | ||
|
|
||
| The data binding setup begins with initializing a `BindingContext` for the `Customer` model. The `BindingContext` links the model properties to the form fields, enabling automatic data synchronization. This is set up in the `FormView` constructor. | ||
| ## Binding the fields |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You link the auto binding section, but I'd add a link to the overview for data binding near the top that people can immediately go to for more info.
| ## Validating data {#validating-data} | ||
|
|
||
| Validation ensures that the data entered into the form adheres to specified rules, improving data quality and preventing invalid submissions. With data binding, validation no longer needs to be manually implemented but instead simply configured, allowing real-time feedback on user inputs. | ||
| ## Validating data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More info about the annotations used and potential other options would be good.
| This step adds data management and display capabilities to the demo app. You’ll define a `Customer` entity, use a Spring Data repository and service for data access, and display customer data in a [`Table`](../../components/table/overview) component. | ||
|
|
||
| By the end of this step, the app created in the [previous step](./creating-a-basic-app) will display a table with the created data that can then be expanded on in the following steps. To run the app: | ||
| This and all future steps utilize a H2 database. To use H2 with Spring Boot, add the H2 dependency to your pom.xml and set spring.datasource.url=jdbc:h2:mem:testdb in your application.properties. Spring Boot will auto-configure and start the H2 database for you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[webforJ.Simplify] Consider 'use' instead of 'utilize'.
| This step adds data management and display capabilities to the demo app. You’ll define a `Customer` entity, use a Spring Data repository and service for data access, and display customer data in a [`Table`](../../components/table/overview) component. | ||
|
|
||
| By the end of this step, the app created in the [previous step](./creating-a-basic-app) will display a table with the created data that can then be expanded on in the following steps. To run the app: | ||
| This and all future steps utilize a H2 database. To use H2 with Spring Boot, add the H2 dependency to your pom.xml and set spring.datasource.url=jdbc:h2:mem:testdb in your application.properties. Spring Boot will auto-configure and start the H2 database for you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Google.WordList] Use 'URL' instead of 'url'.
| This step adds data management and display capabilities to the demo app. You’ll define a `Customer` entity, use a Spring Data repository and service for data access, and display customer data in a [`Table`](../../components/table/overview) component. | ||
|
|
||
| By the end of this step, the app created in the [previous step](./creating-a-basic-app) will display a table with the created data that can then be expanded on in the following steps. To run the app: | ||
| This and all future steps utilize a H2 database. To use H2 with Spring Boot, add the H2 dependency to your pom.xml and set spring.datasource.url=jdbc:h2:mem:testdb in your application.properties. Spring Boot will auto-configure and start the H2 database for you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Google.WordList] Use 'app' instead of 'application'.
No description provided.