| Summary: | [JSF2.0] Facet presets and JEE6 | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] Java Server Faces | Reporter: | Yury Kats <yurykats> | ||||||
| Component: | Core | Assignee: | Cameron Bateman <cameron.bateman> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | debajit.adhikary, konstantin, raghunathan.srinivasan, robert_gallagher, spaxton | ||||||
| Version: | 3.1.2 | ||||||||
| Target Milestone: | 3.2 M6 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | JSF2.0 | ||||||||
| Attachments: |
|
||||||||
|
Description
Yury Kats
re my question about why 1.1 preset is dynamic while 1.2 is static. Found a related discussion and the bug that introduced the dynamic 1.1 preset in bug 218333. Still unclear why 1.1 has to be dynamic though. I think it makes sense to address this along with bug 295261 (adding version 2.0 to the facet). That bug is targeted to M6, this one to M7. The newly added JSF2.0 preset (bug 295261) is not available when targeting a JEE6 server. The preset is configured for Java=5 and Web=2.5, which is true for JEE5 servers, but not JEE6. Created attachment 161064 [details]
Convert to dynamic presets for facets
Yury, could you see if this solves the problem?
> Convert to dynamic presets for facets
> Yury, could you see if this solves the problem?
Here is what I see with these dynamic presets:
1. pre-JEE5 server: JSF 1.1
2. JEE5 server: JSF 1.1, JSF 1.2, JSF 2.0
3. JEE6 server: JSF 1.1, JSF 1.2, JSF 2.0
So the patch does solve the problem as far as it makes JSF2.0 preset visible when targeting JEE6 servers.
However, I am not sure that having all 3 presets available for JEE5 and JEE6 really makes sense.
1. It really clutters the list of choices. The lists grows longer and longer.
2. It is not clear for the user what to pick when multiple options are offered. A natural inclination for the user would be to pick the highest version offered, which would always be JSF2.0. It will obviously not work out of the box with JEE5 servers, since they don't support JSF 2.0, thus the user is driven to creation of non-working projects.
3. The user usually does not even know the difference between various JSF versions. All the user wants to do is to create a JSF-enabled project that runs with the server of his choice.
With all this in mind, I would propose that only best applicable JSF version is shown for each runtime type, that is
JSF 1.1 for pre JEE5
JSF 1.2 for JEE5
JSF 2.0 for JEE6
As long as there is a dynamic preset, the preset can even have a generic name "JSF" and calculate the version of the JSF facet based on Web facet version.
An advanced user, who wants to configure a non-standard JSF/JEE compbination (like running JSF2 on JEE5) would still be able to change facet versions manually.
However, in our adopter product we discovered that dynamic presets negatively affect overall product performance and memory footprint. The problem is that the plugin that contributes a dynamic preset has to be always loaded (for preset to be calculated) by the framework. Even for the user that is not interested in JSF projects at all and is never going to touch any JSF tooling, JSF plugin would be loaded just for the preset to be shown in the dropdown.
For this reason, in our adopter product, we switched away from dynamic presets to static ones. I suggest WTP JSF consider this route as well.
In this case, JSF2 preset would be static, declared as "web=3.0 and java=1.6".
Created attachment 161134 [details]
Change to static presets with one preset per version
> However, I am not sure that having all 3 presets available for JEE5 and JEE6 > really makes sense. Seems reasonable. I'm going to CC Konstantin in case he wants to weigh in on the facet stuff in comment 5. I think this pretty well illustrates the general problem with presets. We have three presets for adding one facet to the starting configuration. I would say that in general if the presets combo exceeds say 10 items at the max and the items listed cannot be differentiated at a quick glance, the setup has failed to achieve its goals. Dynamic presets are used to reduce the number of items in the list. Just saying don't get too attached to presets... This concept will likely be de-emphasized in future releases and eventually removed. The new static presets look good to me. Note though, that Konstantin changed Java facet version numbers, so you better be referencing java "1.5" and "1.6", instead of "5.0" and "6.0". The old would still work (for now), but are deprecated. Changes committed to HEAD (3.2 M6). (In reply to comment #10) > Changes committed to HEAD (3.2 M6). I get an error upon checking out the current state from the HEAD: Description Resource Path Location Type Package 'org.eclipse.jst.jsf.core.internal.contenttype' does not exist in this plug-in MANIFEST.MF /org.eclipse.jst.jsf.core/META-INF line 47 Plug-in Problem Looks like you're working on other issues as well and have not checked them in. (In reply to comment #11) > (In reply to comment #10) > > Changes committed to HEAD (3.2 M6). > > I get an error upon checking out the current state from the HEAD: > Thanks for the catch. Should be fixed. |