3 Replies Latest reply on Sep 19, 2005 12:19 PM by Gavin King

    Annotation

    Ray Tsang Newbie

      Is it just me? or is this annotation thing getting a little bit out of hand?

        • 1. Re: Annotation
          Jacob Hookom Newbie

          I think it can get out of hand, but only when you start using Annotations to describe extrinsic behavior. With Seam, you are focused on intrinsic behavior, such as what makes 'me' valid. Or what assertions do 'I' have over my methods.

          • 2. Re: Annotation
            Christian Bauer Master

            I think it's just the usual distinction of declarative vs. procedural. Of course at some point any declarative construct might be too complex and is better done procedural. I believe we are well within the limits of good declarative concepts so far.

            • 3. Re: Annotation
              Gavin King Master

              There are a just couple that I'm slightly uncomfortable with.

              (1) @IfInvalid(outcome=REDISPLAY) looks and feels like a piece of code. While it definitely saves some LOC to do it that way, we should also provide this via an API, since I could understand some people being uncomfortable with this one. In general, I think our policy sould be that "everything that can be done with an annotation can also be done by API call".

              (2) Context demarcation in annotations is really nice for simple things. It lets you read the methods of a stateful bean as "telling the story" of the conversation. However, for more complex cases, I think the separating flow logic (the JSF navigation rules) from demarcation logic is unnatural and probably bugprone. That's why having jBPM defined pageflow really is important to us.

              OTOH, stuff like @In @Out, @Scope, @Name and constraints like @NotNull, @Length most certainly belong in annotations, and I can't see why anyone would possibly object to those...