[seam-issues] [JBoss JIRA] Updated: (SEAMCRON-10) Rename CronEvent to improve readability?

Peter Royle (JIRA) jira-events at lists.jboss.org
Thu May 12 19:07:31 EDT 2011


     [ https://issues.jboss.org/browse/SEAMCRON-10?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Royle updated SEAMCRON-10:
--------------------------------

    Description: 
Originally scheduled observer methods were quite readable, eg:

public void doStuff(@Observes @Scheduled("10:00") Event e) { ... }

However, due to possible confusion between cron.Event and javax.Event it became:

public void doStuff(@Observes @Scheduled("10:00") CronEvent ce) { ... }

which seems kind of awkward and redundant. Perhaps if we renamed CronEvent to Instant, which doesn't conflict with anything, the readability might be improved like so:

public void doStuff(@Observes @Scheduled("10:00") Instant i) { ... }

Also, Instant better represents the nature of the thing being passed in, as nothing has actually happened yet (so it's not much of an event). My main concern is that it's not as memorable as Event.

Ohter alternatives might be: @Observes @Scheduled("10:00") Moment/Tick/Juncture/Appointment

... not sure ...


  was:
Originally scheduled observer methods were quite readable, eg:

public void doStuff(@Observes @Scheduled("10:00") Event e) { ... }

However, due to possible confusion between cron.Event and javax.Event it became:

public void doStuff(@Observes @Scheduled("10:00") CronEvent ce) { ... }

which seems kind of awkward and redundant. Perhaps if we renamed CronEvent to Instant, which doesn't conflict with anything, the readability might be improved like so:

public void doStuff(@Observes @Scheduled("10:00") Instant i) { ... }

Also, Instant better represents the nature of the thing being passed in, as nothing has actually happened yet. My main concern is that it's not as memorable as Event, but then is CronEvent?

... not sure ...




> Rename CronEvent to improve readability?
> ----------------------------------------
>
>                 Key: SEAMCRON-10
>                 URL: https://issues.jboss.org/browse/SEAMCRON-10
>             Project: Seam Cron
>          Issue Type: Task
>            Reporter: Peter Royle
>            Assignee: Peter Royle
>            Priority: Minor
>             Fix For: 3.0.0.Alpha1
>
>
> Originally scheduled observer methods were quite readable, eg:
> public void doStuff(@Observes @Scheduled("10:00") Event e) { ... }
> However, due to possible confusion between cron.Event and javax.Event it became:
> public void doStuff(@Observes @Scheduled("10:00") CronEvent ce) { ... }
> which seems kind of awkward and redundant. Perhaps if we renamed CronEvent to Instant, which doesn't conflict with anything, the readability might be improved like so:
> public void doStuff(@Observes @Scheduled("10:00") Instant i) { ... }
> Also, Instant better represents the nature of the thing being passed in, as nothing has actually happened yet (so it's not much of an event). My main concern is that it's not as memorable as Event.
> Ohter alternatives might be: @Observes @Scheduled("10:00") Moment/Tick/Juncture/Appointment
> ... not sure ...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the seam-issues mailing list