yes, good idea. I think we should first finish the GoF patterns
though. We still need to add some Java Docs - it would be useful to
discuss how much we should write in there? - and finish the unit tests.
We also need a tool that can test what annotations are defined for which
classes, so that we can do a proper unit test.
My suggestion would be that we finish one set of patterns properly
before moving onto others.
Regards
Heinz
--
Dr Heinz M. Kabutz (PhD CompSci)
Author of "The Java(tm) Specialists' Newsletter"
Sun Java Champion
http://www.javaspecialists.eu
Tel: +30 69 72 850 460
Skype: kabutz
On 8/15/10 8:04 PM, Marco Tedone wrote:
> Why don�t we add some few, well known, enterprise patterns, such as
org.patterns.gof.CompositePattern=Component(@), Leaf(@), Composite(@)
And for the Singleton pattern:
org.patterns.gof.SingletonPattern=Singleton(@), SingletonMethod(@),
Variation(enum={LAZY, EAGER})
Something like that?
Then when the test runs it loads the file, loads the expected configuration
and checks that the actual code contains the expected configuration?
Regards,
Marco
-----Original Message-----
From: jpat...@googlegroups.com [mailto:jpat...@googlegroups.com] On
Behalf Of Dr Heinz M. Kabutz
Sent: 15 August 2010 18:19
To: jpat...@googlegroups.com
Subject: Re: [jpatterns] Other patterns?
Hi Marco,
yes, good idea. I think we should first finish the GoF patterns though. We
still need to add some Java Docs - it would be useful to discuss how much we
should write in there? - and finish the unit tests.
We also need a tool that can test what annotations are defined for which
classes, so that we can do a proper unit test.
My suggestion would be that we finish one set of patterns properly before
moving onto others.
Regards
Heinz
--
Dr Heinz M. Kabutz (PhD CompSci)
Author of "The Java(tm) Specialists' Newsletter"
Sun Java Champion
http://www.javaspecialists.eu
Tel: +30 69 72 850 460
Skype: kabutz
On 8/15/10 8:04 PM, Marco Tedone wrote:
> Why don't we add some few, well known, enterprise patterns, such as
> MVC, DAO, Business Delegate and Value Object? In MVC we could have
> something like @ModelViewController and then, within it, @Model, @View
> and @Controller, etc. We could add a new Source, called EE-PATTERNS
>
>
--
You received this message because you are subscribed to the Google Groups
"jpatterns" group.
To post to this group, send email to jpat...@googlegroups.com.
To unsubscribe from this group, send email to
jpatterns+...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/jpatterns?hl=en.
What about an XML file like the attached one to describe patterns? If it
seems ok we could define an XML schema for it, and then use JAXB to
transform the pattern definition in POJOs. A test would then have easy life
to read the POJOs and using introspection validate that the classes contain
actually what they are supposed to contain.
In the attached file I described the @CompositePattern and the
@SingletonPattern. Interesting here are: the re-use of the <pattern> element
for participants; the definition of enumerations as "constraints".
Let me know what you think about it.
Regards,
Marco
-----Original Message-----
From: jpat...@googlegroups.com [mailto:jpat...@googlegroups.com] On
Behalf Of Dr Heinz M. Kabutz
Sent: 15 August 2010 18:19
To: jpat...@googlegroups.com
Subject: Re: [jpatterns] Other patterns?
Hi Marco,
yes, good idea. I think we should first finish the GoF patterns though. We
still need to add some Java Docs - it would be useful to discuss how much we
should write in there? - and finish the unit tests.
We also need a tool that can test what annotations are defined for which
classes, so that we can do a proper unit test.
My suggestion would be that we finish one set of patterns properly before
moving onto others.
Regards
Heinz
--
Dr Heinz M. Kabutz (PhD CompSci)
Author of "The Java(tm) Specialists' Newsletter"
Sun Java Champion
http://www.javaspecialists.eu
Tel: +30 69 72 850 460
Skype: kabutz
On 8/15/10 8:04 PM, Marco Tedone wrote:
> Why don't we add some few, well known, enterprise patterns, such as
> MVC, DAO, Business Delegate and Value Object? In MVC we could have
> something like @ModelViewController and then, within it, @Model, @View
> and @Controller, etc. We could add a new Source, called EE-PATTERNS
>
>
--
marco i dont see the value of this xml serialization of the annotation structure. that is what we have the javacode for. if you go for such an approach you would generate the annotation sources from that.
but then you go to string hell. i prefer code completion, static checks etc that's why I write code no a metalanguage that gets translated to code. and at the same time being x times as verbose as the code.
if we want to verify some basic annotation structure we could write a ten line checker that uses reflection or ASM.
Michael
Von meinem iPad gesendet
> <pattern-documentation-example.xml>
Cheers
Michael
I don't know.
Michael
Regards Heinz -- Dr Heinz M. Kabutz (PhD CompSci) Author of "The Java(tm) Specialists' Newsletter" Sun Java Champion http://www.javaspecialists.eu Tel: +30 69 72 850 460 Skype: kabutz
We can also use JavaParser or ANTLR for parsing the source that works too.
Cheers Michael
On Mon, 16 Aug 2010 18:38:50 +0300, "Dr Heinz M. Kabutz"
<he...@javaspecialists.eu> wrote:
> Something simple, probably based on reflection.� One of the
> suggestions made, however, was to change the RetentionType to Class -
this
> way our users do not have dependencies to our classes at runtime.��� I
> would prefer to keep the retentiontype == runtime, so that we can write
> some simple reflection tools that can tell us what elements have
patterns
> annotations.
>
> Regards
>
> Heinz
> --
> Dr Heinz M. Kabutz (PhD CompSci)
> Author of "The Java(tm) Specialists' Newsletter"
> Sun Java Champion
> http://www.javaspecialists.eu [1]
> [8]:
>
> Heinz,
>
> What about an XML file like the attached one to describe patterns? If
> it seems ok we could define an XML schema for it, and then use JAXB
> to transform the pattern definition in POJOs. A test would then have
> easy life to read the POJOs and using introspection validate that the
> classes contain actually what they are supposed to contain.
>
> In the attached file I described the @CompositePattern and the
> @SingletonPattern. Interesting here are: the re-use of the
>
> http://www.javaspecialists.eu [12]
> Tel: +30 69 72 850 460
> Skype: kabutz
>
> On 8/15/10 8:04 PM, Marco Tedone wrote:
>
> Why don't we add some few, well known, enterprise patterns, such as
> MVC, DAO, Business Delegate and Value Object? In MVC we could have
> something like @ModelViewController and then, within it, @Model,
> @View and @Controller, etc. We could add a new Source, called
> EE-PATTERNS
>
> --
> You received this message because you are subscribed to the Google
> Groups "jpatterns" group.
> To post to this group, send email to jpat...@googlegroups.com [13].
> To unsubscribe from this group, send email to
> jpatterns+...@googlegroups.com [14].
> For more options, visit this group at
> http://groups.google.com/group/jpatterns?hl=en [15].
>
> --
> You received this message because you are subscribed to the Google
> Groups
>
> "jpatterns" group.
>
> To post to this group, send email to jpat...@googlegroups.com [16].
> To unsubscribe from this group, send email to
>
> jpatterns+...@googlegroups.com [17].
>
> For more options, visit this group at
>
> http://groups.google.com/group/jpatterns?hl=en [18].
>
> --
> You received this message because you are subscribed to the Google
> Groups "jpatterns" group.
> To post to this group, send email to jpat...@googlegroups.com [19].
> To unsubscribe from this group, send email to
> jpatterns+...@googlegroups.com [20].
> For more options, visit this group at
> http://groups.google.com/group/jpatterns?hl=en [21].
>
> --
> You received this message because you are subscribed to the Google
Groups
>
> "jpatterns" group.
>
> To post to this group, send email to jpat...@googlegroups.com [22].
> To unsubscribe from this group, send email to
>
> jpatterns+...@googlegroups.com [23].
>
> For more options, visit this group at
>
> http://groups.google.com/group/jpatterns?hl=en [24].
>
> --
> You received this message because you are subscribed to the Google
Groups
> "jpatterns" group.
> To post to this group, send email to jpat...@googlegroups.com.
> To unsubscribe from this group, send email to
> jpatterns+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/jpatterns?hl=en.
>
>
> Links:
> ------
> [1] http://www.javaspecialists.eu
> [2] mailto:jpat...@googlegroups.com
> [3] mailto:jpat...@googlegroups.com
> [4] mailto:jpat...@googlegroups.com
> [5] mailto:jpat...@googlegroups.com
> [6] mailto:jpat...@googlegroups.com
> [7] mailto:jpat...@googlegroups.com
> [8] mailto:marco....@googlemail.com
> [9] mailto:jpat...@googlegroups.com
> [10] mailto:jpat...@googlegroups.com
> [11] mailto:jpat...@googlegroups.com
> [12] http://www.javaspecialists.eu
> [13] mailto:jpat...@googlegroups.com
> [14] mailto:jpatterns+...@googlegroups.com
> [15] http://groups.google.com/group/jpatterns?hl=en
> [16] mailto:jpat...@googlegroups.com
> [17] mailto:jpatterns+...@googlegroups.com
> [18] http://groups.google.com/group/jpatterns?hl=en
> [19] mailto:jpat...@googlegroups.com
> [20] mailto:jpatterns+...@googlegroups.com
> [21] http://groups.google.com/group/jpatterns?hl=en
> [22] mailto:jpat...@googlegroups.com
> [23] mailto:jpatterns+...@googlegroups.com
> [24] http://groups.google.com/group/jpatterns?hl=en