-
Notifications
You must be signed in to change notification settings - Fork 43
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
Allow users choices for starter code #168
Comments
The current consensus is that this is a priority item to be implemented soon. Concise input from key community members can be found here: https://docs.google.com/spreadsheets/d/1bthiYVjX_UK7Xp2qQmq93awPwVhVCDnprGdzeMtv_ow/edit?usp=sharing. A discussion thread on the mailing list can be found here: https://www.eclipse.org/lists/starter-dev/msg00184.html. |
I believe it is important to be deliberate about avoiding too much overlap with the examples project (though clearly there is some overlap): https://github.com/eclipse-ee4j/jakartaee-examples. Both are separate use cases. It's best we focus on the basic getting started experience mostly for beginners and leave less common/more advanced features/options to the examples project instead. |
I think all options should be allowed at any time and never grayed out. For example, Bean Validation could be used even without persistence, e.g. inside a REST resource like here: https://dzone.com/articles/bean-validation-in-jax-rs. I believe that a variant for Faces is also easy to create in a similar way. |
I totally agree. That's what the starter is for, to get a qucik start, especially for new or less experienced people. |
I agree that this is the main focus, to aim at beginners to get started with Jakarta EE quickly. But I hope Starter is there also to help experienced devs to be more productive with Jakarta EE. Therefore in the future, I'd like it to provide examples of more advanced stuff like web.xml, beans.xml, orm.xml (Persistence), as these and some other pieces are not well documented and it's hard to find simple examples. For example, I had to note all the standard persistence.xml options in my blog so that I can easily find them when I need them: https://ondro.inginea.eu/index.php/properties-and-config-in-persistence-xml/. What is also hard to find is XSD schemas for various XMLs, even for persistence.xml, or when you want to create CDI beans.xml from scratch (if your IDE doesn't help you well enough). I like the idea that as an experienced developer, I could go to the Starter and generate an example, from which I can then copy to my project. |
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:
❶ 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:
❶ 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
The text was updated successfully, but these errors were encountered: