[jbossseam-issues] [JBoss JIRA] Reopened: (JBSEAM-1600) Make @Name value optional, use the simple name of class as default

Dan Allen (JIRA) jira-events at lists.jboss.org
Sun Jul 15 21:48:11 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBSEAM-1600?page=all ]

Dan Allen reopened JBSEAM-1600:
-------------------------------

             
I am going to stick out my neck on this one and pray that it pays off, but I really think you should reconsider. I bring a patch as a peace offering. The patch is SO simple and it adds such elegance to Seam. It is also 100% backward compatible, so we aren't taking any risk here.

> Make @Name value optional, use the simple name of class as default
> ------------------------------------------------------------------
>
>                 Key: JBSEAM-1600
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1600
>             Project: JBoss Seam
>          Issue Type: Feature Request
>          Components: Core
>    Affects Versions: 2.0.0.BETA1
>            Reporter: Dan Allen
>            Priority: Minor
>         Attachments: JBSEAM-1600-v1.txt
>
>   Original Estimate: 4 hours
>  Remaining Estimate: 4 hours
>
> 99.99999999% of the time, when you want to create a Seam component, the convention is to use the simple name of the class with the first letter in lowercase.  Open any Seam component in the examples directory and you will observe this conversion.  Would it be reasonable to use the clazz.getSimpleName() and lowercase the first letter by default when creating the context variable?  I would even settle for a configuration setting in core:manager that would enable this even if it were not used as the default.  The change shouldn't cause compatibility issues since an explicit value is required as is.
> We are going around saying, "Look!  Configuration by exception, see!"
> @Name("hotel")
> public class Hotel {
> ...
> }
> Um, hello.  No.  That is not configuration by exception.  Let's make it that way!

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list