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

Dan Allen (JIRA) jira-events at lists.jboss.org
Mon Jul 16 09:48:03 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBSEAM-1600?page=comments#action_12369089 ] 
            
Dan Allen commented on JBSEAM-1600:
-----------------------------------

The man has spoken ;)

I now see your point. I mean, after all, it is a @Name annotation. That implies you are going to supply a name. Time to fry bigger fish.

> 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