As sort of an extension to this problem, how would you name the following
Perl Roles within a Bounded Context of RBAC (also known as why I hate the
name Role and wish Perl 6 had just used Trait)

* role that defines a role object interface
* role that defines a user object interface
* role that defines an interface if an object can have roles (e.g. users
have roles, roles have roles )

* class that is a role object
* class that is a user object

* a role that implements the core functionality required for a role, such
as grant/revoke permission, name, check access
* role that provides the actual user object behavior
* role that provides the behavior of objects that can have roles

just trying to figure out how other people name things




On Sat, Oct 19, 2013 at 12:08 AM, Kent Fredric <kentfred...@gmail.com>wrote:

>
> On 19 October 2013 09:55, Karen Etheridge <p...@froods.org> wrote:
>
>> I don't think a top level interface is generally appropriate for these
>> sorts of things
>>
>
> Indeed, not everything that exports is called Exporter::<*>
>
> Exporter:: is instead mostly filled with modules for the purpose of
> exporting, not simply because they export.
>
> Just with roles there's a lot of vague ways interfaces can exist and be
> named, so anything other than Role::  seems like namespace pollution.
>
> ie:  Role::HasMessage becoming simply "HasMessage" seems like a step
> backward to me, its just there's no better name for it.
>
> There's literally no other behavioural context to go on than the "
> HasMessage" property, as although this module may be used for exceptions
> predominantly, nothing about the roles behaviour indicates that it is
> exception-only, so "exception" being a namespace token just makes people
> overlook it.
>
> So in a nutshell:
>
>
>
> *Where it is possible and logical to do so, use some prefix relevant to
> the problem your module is suited for.    ( ie: Foo::Role::Blah , Blah
> interface role for Foo ) *
> *Where otherwise, a Role::  prefix is preferred over no prefix at all. *
>
>
> --
> Kent
>



-- 
Caleb Cushing

http://xenoterracide.com

Calendar:
https://www.google.com/calendar/embed?src=xenoterracide%40gmail.com&ctz=America/Chicago

Reply via email to