-
1. Re: Seam3-faces event qualifier names
nickarls Apr 1, 2010 9:03 AM (in response to adamw)That's one option but there is always the question of which is the lesser evil: using FQCN:s or trying to remember what the $CURSE the annotation was named again?
-
2. Re: Seam3-faces event qualifier names
adamw Apr 1, 2010 2:21 PM (in response to adamw)True, but then you have to remember the package name, that is, it's not IDE-friendly. You import the annotation, and then the IDE won't tell you what's the second import package. (unless you do a search etc).
Maybe if the annotation was named as the event descriptor and some suffix, then the IDEs could auto-complete the name?
Adam
-
3. Re: Seam3-faces event qualifier names
dan.j.allen Apr 3, 2010 5:57 AM (in response to adamw)A more obvious qualifier to me would simply be @org.jboss.seam.faces.inject.Faces. The event name itself is already a distinct type and does not need to be further qualified. We just need to take ownership of it into this extension. It also makes it clear where the event is coming from.
That would make the observer look like:
public void onEvent(@Observes @Faces ExceptionQueuedEvent event) {}
I choose the package name org.jboss.seam.faces.inject to follow the pattern used in the CDI API:
javax.enterprise.inject.Default javax.enterprise.inject.Any javax.enterprise.inject.New
-
4. Re: Seam3-faces event qualifier names
dan.j.allen Apr 3, 2010 5:58 AM (in response to adamw)So I agree with Adam. IDE experience is critical. If we don't have that, we have nothing ;)
-
5. Re: Seam3-faces event qualifier names
nickarls Apr 3, 2010 12:15 PM (in response to adamw)I could live with @Faces. Not sure about the .inject. in the package, I think the EG tried to minimize the new packs.
-
6. Re: Seam3-faces event qualifier names
dan.j.allen Apr 3, 2010 6:51 PM (in response to adamw)How about one of these:
- org.jboss.seam.faces.annotations.Faces
- org.jboss.seam.faces.qualifiers.Faces
We should probably think about standardizing the use of plural or singular package names across projects. I know these are trite topics, but consistency really makes it easier on the developer.
-
7. Re: Seam3-faces event qualifier names
dan.j.allen Apr 3, 2010 6:55 PM (in response to adamw)We should also consider whether a qualifier is needed at all. Nik, could you identify a scenario where we would cause a conflict by not using a qualifier?
-
8. Re: Seam3-faces event qualifier names
nickarls Apr 3, 2010 8:39 PM (in response to adamw)You need the @Before/@After if you just want to observe one end of the phase.
-
9. Re: Seam3-faces event qualifier names
dan.j.allen Apr 3, 2010 10:00 PM (in response to adamw)Yes, I agree we need the qualifiers for the phase events. What I was referring to is the system events. For example, PreRenderViewEvent. Do we need to qualify that with @Faces?
-
10. Re: Seam3-faces event qualifier names
nickarls Apr 4, 2010 5:24 PM (in response to adamw)The system events are OK without qualifiers at all since the event objects are unique. The phases events are the opposite since they all pass the same event object...
-
11. Re: Seam3-faces event qualifier names
dan.j.allen Apr 4, 2010 6:12 PM (in response to adamw)Sounds like a plan. Let's make that change for the system events.
-
12. Re: Seam3-faces event qualifier names
adamw Apr 6, 2010 9:44 AM (in response to adamw)Great :) No qualifiers is of course the most user-friendly solution :)
Adam