eclipse-ee4j / eclipse-ee4j/starter
Allow users choices for starter code
- Dominant language
- HTML
- Stars
- 60
- Forks
- 51
- PR merge metrics
- No merged PRs in 30d
Description
**The Basics**
The Starter UI will provide the user a set of sensible choices for the generated starter code. The initial set of choices will be as following:
```
Please choose the type of application*:
(*) Simple RESTful service ❶ ( ) REStful CRUD service ➋ ( ) CRUD web application ❸
```
❶ The default option. Simply generates a RESTful endpoint that prints {“hello”:”world”} in application/json format. Pretty much just Jakarta REST and JSON. No tests included. See here for reference (pretty much already done): https://github.com/m-reza-rahman/starter/tree/master/minimal-starter.
➋ Generates CRUD REST service with just one simple Entity. Shows sample usage of Jakarta REST, JSON, CDI, Persistence, Transactions/Enterprise Beans and Validation. An embedded database is used for convenience (ideally the default one already included in the runtime). A helpful sample test included. See here for reference (pretty much already done): https://github.com/m-reza-rahman/starter/tree/master/rest-starter.
❸ Generates CRUD Faces web application with just one table/screen and one simple entity. No REST endpoint is included. Shows sample usage of Jakarta Faces, CDI, Persistence, Transactions/Enterprise Beans and Validation. An embedded database is used for convenience (ideally the default one already included in the runtime). A helpful sample test included.
**The Next Step**
After this initial version is completed, the Starter UI may provide other options to further customize the starter code as follows:
```
Please choose the type of application:* ❶
(*) RESTful service ➋ ( ) web application ❸
Please choose features to include:
[ ] Persistence ❹ [ ] Validation ❺ [ ] Test ➏
```
❶ User must choose either a REST or Faces web interface for the generated application. The choices are radio buttons.
➋ If Persistence is not selected, simply generates a RESTful endpoint that prints {“hello”:”world”} in application/json format. If Persistence is selected, generates CRUD REST service with just one simple Entity. Shows sample usage of Jakarta REST, JSON, CDI, Persistence and Transactions/Enterprise Beans. An embedded database is used for convenience (ideally the default one already included in the runtime).
❸ If Persistence is not selected, simply generates a basic page that prints “Hello World from Jakarta EE”. If Persistence is selected, generates CRUD Faces web application with just one table/screen and one simple entity. No REST endpoint is included. Shows sample usage of Jakarta Faces, CDI, Persistence and Transactions/Enterprise Beans. An embedded database is used for convenience (ideally the default one already included in the runtime).
❹ Determines if the sample code should be “hello world” or CRUD.
❺ Only activated if Persistence is selected. Otherwise grayed out. If selected, add validation to Entity as well as REST endpoint or Faces backing bean.
➏ If selected, include a helpful sample test.
**Later on**
Further in the future, more use cases/technologies may be added as options:
`[ ] Security [ ] Messaging [ ] Mail [ ] Batch [ ] WebSocket`
Contributor guide
Assessment
This issue has not been assessed yet.